From 157002aceaca82300bf37faa16779ab66f1926e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Jan 2025 18:20:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20post-p?= =?UTF-8?q?rocessor?= 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 --- .../google-cloud-datastream/v1/.eslintignore | 7 - .../google-cloud-datastream/v1/.eslintrc.json | 3 - .../google-cloud-datastream/v1/.gitignore | 14 - .../google-cloud-datastream/v1/.jsdoc.js | 55 - .../google-cloud-datastream/v1/.mocharc.js | 33 - .../google-cloud-datastream/v1/.prettierrc.js | 22 - .../google-cloud-datastream/v1/README.md | 1 - .../google-cloud-datastream/v1/package.json | 58 - .../cloud/datastream/v1/datastream.proto | 1114 - .../datastream/v1/datastream_resources.proto | 1459 - .../v1/protos/protos.d.ts | 21503 ------ .../v1/protos/protos.js | 54442 ---------------- .../v1/protos/protos.json | 5536 -- .../datastream.create_connection_profile.js | 95 - .../datastream.create_private_connection.js | 90 - .../generated/v1/datastream.create_route.js | 86 - .../generated/v1/datastream.create_stream.js | 95 - .../datastream.delete_connection_profile.js | 76 - .../datastream.delete_private_connection.js | 81 - .../generated/v1/datastream.delete_route.js | 76 - .../generated/v1/datastream.delete_stream.js | 76 - .../datastream.discover_connection_profile.js | 95 - .../v1/datastream.fetch_static_ips.js | 73 - .../v1/datastream.get_connection_profile.js | 61 - .../v1/datastream.get_private_connection.js | 61 - .../generated/v1/datastream.get_route.js | 61 - .../generated/v1/datastream.get_stream.js | 61 - .../v1/datastream.get_stream_object.js | 61 - .../v1/datastream.list_connection_profiles.js | 84 - .../v1/datastream.list_private_connections.js | 87 - .../generated/v1/datastream.list_routes.js | 86 - .../v1/datastream.list_stream_objects.js | 76 - .../generated/v1/datastream.list_streams.js | 84 - .../v1/datastream.lookup_stream_object.js | 66 - .../generated/v1/datastream.run_stream.js | 72 - .../v1/datastream.start_backfill_job.js | 62 - .../v1/datastream.stop_backfill_job.js | 62 - .../datastream.update_connection_profile.js | 93 - .../generated/v1/datastream.update_stream.js | 93 - ...t_metadata_google.cloud.datastream.v1.json | 1299 - .../google-cloud-datastream/v1/src/index.ts | 25 - .../v1/src/v1/datastream_client.ts | 4242 -- .../v1/src/v1/datastream_client_config.json | 168 - .../v1/src/v1/datastream_proto_list.json | 4 - .../v1/src/v1/gapic_metadata.json | 307 - .../v1/src/v1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_datastream_v1.ts | 5419 -- .../google-cloud-datastream/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../v1alpha1/.eslintignore | 7 - .../v1alpha1/.eslintrc.json | 3 - .../v1alpha1/.gitignore | 14 - .../v1alpha1/.jsdoc.js | 55 - .../v1alpha1/.mocharc.js | 33 - .../v1alpha1/.prettierrc.js | 22 - .../v1alpha1/README.md | 1 - .../v1alpha1/package.json | 58 - .../datastream/v1alpha1/datastream.proto | 895 - .../v1alpha1/datastream_resources.proto | 683 - .../v1alpha1/protos/protos.d.ts | 15466 ----- .../v1alpha1/protos/protos.js | 39968 ------------ .../v1alpha1/protos/protos.json | 4240 -- .../datastream.create_connection_profile.js | 86 - .../datastream.create_private_connection.js | 86 - .../v1alpha1/datastream.create_route.js | 86 - .../v1alpha1/datastream.create_stream.js | 95 - .../datastream.delete_connection_profile.js | 76 - .../datastream.delete_private_connection.js | 81 - .../v1alpha1/datastream.delete_route.js | 76 - .../v1alpha1/datastream.delete_stream.js | 76 - .../datastream.discover_connection_profile.js | 87 - .../v1alpha1/datastream.fetch_errors.js | 61 - .../v1alpha1/datastream.fetch_static_ips.js | 73 - .../datastream.get_connection_profile.js | 61 - .../datastream.get_private_connection.js | 61 - .../v1alpha1/datastream.get_route.js | 61 - .../v1alpha1/datastream.get_stream.js | 61 - .../datastream.list_connection_profiles.js | 84 - .../datastream.list_private_connections.js | 86 - .../v1alpha1/datastream.list_routes.js | 86 - .../v1alpha1/datastream.list_streams.js | 84 - .../datastream.update_connection_profile.js | 84 - .../v1alpha1/datastream.update_stream.js | 93 - ...data_google.cloud.datastream.v1alpha1.json | 1051 - .../v1alpha1/src/index.ts | 25 - .../src/v1alpha1/datastream_client.ts | 3276 - .../v1alpha1/datastream_client_config.json | 143 - .../src/v1alpha1/datastream_proto_list.json | 4 - .../v1alpha1/src/v1alpha1/gapic_metadata.json | 253 - .../v1alpha1/src/v1alpha1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1alpha1/system-test/install.ts | 49 - .../test/gapic_datastream_v1alpha1.ts | 3991 -- .../v1alpha1/tsconfig.json | 19 - .../v1alpha1/webpack.config.js | 64 - .../datastream/v1/datastream_resources.proto | 107 +- .../protos/protos.d.ts | 321 + .../google-cloud-datastream/protos/protos.js | 743 + .../protos/protos.json | 67 +- 103 files changed, 1225 insertions(+), 169989 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream.proto delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream_resources.proto delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.discover_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.fetch_static_ips.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream_object.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_connection_profiles.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_private_connections.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_routes.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_stream_objects.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_streams.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.lookup_stream_object.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.run_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.start_backfill_job.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.stop_backfill_job.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/test/gapic_datastream_v1.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/README.md delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/package.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream.proto delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream_resources.proto delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.discover_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_errors.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_static_ips.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_private_connection.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_route.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_connection_profiles.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_private_connections.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_routes.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_streams.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_connection_profile.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_stream.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client_config.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/test/gapic_datastream_v1alpha1.ts delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-datastream/v1alpha1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-datastream/v1/.eslintignore b/owl-bot-staging/google-cloud-datastream/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.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-datastream/v1/.eslintrc.json b/owl-bot-staging/google-cloud-datastream/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/.gitignore b/owl-bot-staging/google-cloud-datastream/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.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-datastream/v1/.jsdoc.js b/owl-bot-staging/google-cloud-datastream/v1/.jsdoc.js deleted file mode 100644 index d3af80fe491..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.jsdoc.js +++ /dev/null @@ -1,55 +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 -// -// 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 2025 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/datastream', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-datastream/v1/.mocharc.js b/owl-bot-staging/google-cloud-datastream/v1/.mocharc.js deleted file mode 100644 index 24e9d15257f..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.mocharc.js +++ /dev/null @@ -1,33 +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 -// -// 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-datastream/v1/.prettierrc.js b/owl-bot-staging/google-cloud-datastream/v1/.prettierrc.js deleted file mode 100644 index d89a632f90b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/.prettierrc.js +++ /dev/null @@ -1,22 +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 -// -// 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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/README.md b/owl-bot-staging/google-cloud-datastream/v1/README.md deleted file mode 100644 index a7903c0b77c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Datastream: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datastream/v1/package.json b/owl-bot-staging/google-cloud-datastream/v1/package.json deleted file mode 100644 index 6eee35e6b34..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/datastream", - "version": "0.1.0", - "description": "Datastream client for Node.js", - "repository": "googleapis/nodejs-datastream", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google datastream", - "datastream", - "datastream" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream.proto b/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream.proto deleted file mode 100644 index 8cf46f06328..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream.proto +++ /dev/null @@ -1,1114 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datastream.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datastream/v1/datastream_resources.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Datastream.V1"; -option go_package = "cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb"; -option java_multiple_files = true; -option java_outer_classname = "DatastreamProto"; -option java_package = "com.google.cloud.datastream.v1"; -option php_namespace = "Google\\Cloud\\Datastream\\V1"; -option ruby_package = "Google::Cloud::Datastream::V1"; - -// Datastream service -service Datastream { - option (google.api.default_host) = "datastream.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Use this method to list connection profiles created in a project and - // location. - rpc ListConnectionProfiles(ListConnectionProfilesRequest) - returns (ListConnectionProfilesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/connectionProfiles" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to get details about a connection profile. - rpc GetConnectionProfile(GetConnectionProfileRequest) - returns (ConnectionProfile) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a connection profile in a project and location. - rpc CreateConnectionProfile(CreateConnectionProfileRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/connectionProfiles" - body: "connection_profile" - }; - option (google.api.method_signature) = - "parent,connection_profile,connection_profile_id"; - option (google.longrunning.operation_info) = { - response_type: "ConnectionProfile" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to update the parameters of a connection profile. - rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" - body: "connection_profile" - }; - option (google.api.method_signature) = "connection_profile,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "ConnectionProfile" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to delete a connection profile. - rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to discover a connection profile. - // The discover API call exposes the data objects and metadata belonging to - // the profile. Typically, a request returns children data objects of a - // parent data object that's optionally supplied in the request. - rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) - returns (DiscoverConnectionProfileResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover" - body: "*" - }; - } - - // Use this method to list streams in a project and location. - rpc ListStreams(ListStreamsRequest) returns (ListStreamsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/streams" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to get details about a stream. - rpc GetStream(GetStreamRequest) returns (Stream) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/streams/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a stream. - rpc CreateStream(CreateStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/streams" - body: "stream" - }; - option (google.api.method_signature) = "parent,stream,stream_id"; - option (google.longrunning.operation_info) = { - response_type: "Stream" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to update the configuration of a stream. - rpc UpdateStream(UpdateStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{stream.name=projects/*/locations/*/streams/*}" - body: "stream" - }; - option (google.api.method_signature) = "stream,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Stream" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to delete a stream. - rpc DeleteStream(DeleteStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/streams/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to start, resume or recover a stream with a non default CDC - // strategy. - rpc RunStream(RunStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/streams/*}:run" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Stream" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to get details about a stream object. - rpc GetStreamObject(GetStreamObjectRequest) returns (StreamObject) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/streams/*/objects/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to look up a stream object by its source object identifier. - rpc LookupStreamObject(LookupStreamObjectRequest) returns (StreamObject) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup" - body: "*" - }; - } - - // Use this method to list the objects of a specific stream. - rpc ListStreamObjects(ListStreamObjectsRequest) - returns (ListStreamObjectsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/streams/*}/objects" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to start a backfill job for the specified stream object. - rpc StartBackfillJob(StartBackfillJobRequest) - returns (StartBackfillJobResponse) { - option (google.api.http) = { - post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob" - body: "*" - }; - option (google.api.method_signature) = "object"; - } - - // Use this method to stop a backfill job for the specified stream object. - rpc StopBackfillJob(StopBackfillJobRequest) - returns (StopBackfillJobResponse) { - option (google.api.http) = { - post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob" - body: "*" - }; - option (google.api.method_signature) = "object"; - } - - // The FetchStaticIps API call exposes the static IP addresses used by - // Datastream. - rpc FetchStaticIps(FetchStaticIpsRequest) returns (FetchStaticIpsResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*}:fetchStaticIps" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a private connectivity configuration. - rpc CreatePrivateConnection(CreatePrivateConnectionRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/privateConnections" - body: "private_connection" - }; - option (google.api.method_signature) = - "parent,private_connection,private_connection_id"; - option (google.longrunning.operation_info) = { - response_type: "PrivateConnection" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to get details about a private connectivity configuration. - rpc GetPrivateConnection(GetPrivateConnectionRequest) - returns (PrivateConnection) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/privateConnections/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to list private connectivity configurations in a project - // and location. - rpc ListPrivateConnections(ListPrivateConnectionsRequest) - returns (ListPrivateConnectionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/privateConnections" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to delete a private connectivity configuration. - rpc DeletePrivateConnection(DeletePrivateConnectionRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/privateConnections/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to create a route for a private connectivity configuration - // in a project and location. - rpc CreateRoute(CreateRouteRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes" - body: "route" - }; - option (google.api.method_signature) = "parent,route,route_id"; - option (google.longrunning.operation_info) = { - response_type: "Route" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to get details about a route. - rpc GetRoute(GetRouteRequest) returns (Route) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to list routes created for a private connectivity - // configuration in a project and location. - rpc ListRoutes(ListRoutesRequest) returns (ListRoutesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to delete a route. - rpc DeleteRoute(DeleteRouteRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request message for 'discover' ConnectionProfile request. -message DiscoverConnectionProfileRequest { - // Required. The parent resource of the connection profile type. Must be in - // the format `projects/*/locations/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // The connection profile on which to run discover. - oneof target { - // An ad-hoc connection profile configuration. - ConnectionProfile connection_profile = 200; - - // A reference to an existing connection profile. - string connection_profile_name = 201; - } - - // The depth of the retrieved hierarchy of data objects. - oneof hierarchy { - // Whether to retrieve the full hierarchy of data objects (TRUE) or only the - // current level (FALSE). - bool full_hierarchy = 3; - - // The number of hierarchy levels below the current level to be retrieved. - int32 hierarchy_depth = 4; - } - - // The data object to populate with child data objects and metadata. - oneof data_object { - // Oracle RDBMS to enrich with child data objects and metadata. - OracleRdbms oracle_rdbms = 100; - - // MySQL RDBMS to enrich with child data objects and metadata. - MysqlRdbms mysql_rdbms = 101; - - // PostgreSQL RDBMS to enrich with child data objects and metadata. - PostgresqlRdbms postgresql_rdbms = 102; - - // SQLServer RDBMS to enrich with child data objects and metadata. - SqlServerRdbms sql_server_rdbms = 103; - } -} - -// Response from a discover request. -message DiscoverConnectionProfileResponse { - // The data object that has been enriched by the discover API call. - oneof data_object { - // Enriched Oracle RDBMS object. - OracleRdbms oracle_rdbms = 100; - - // Enriched MySQL RDBMS object. - MysqlRdbms mysql_rdbms = 101; - - // Enriched PostgreSQL RDBMS object. - PostgresqlRdbms postgresql_rdbms = 102; - - // Enriched SQLServer RDBMS object. - SqlServerRdbms sql_server_rdbms = 103; - } -} - -// Request message for 'FetchStaticIps' request. -message FetchStaticIpsRequest { - // Required. The resource name for the location for which static IPs should be - // returned. Must be in the format `projects/*/locations/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Maximum number of Ips to return, will likely not be specified. - int32 page_size = 2; - - // A page token, received from a previous `ListStaticIps` call. - // will likely not be specified. - string page_token = 3; -} - -// Response message for a 'FetchStaticIps' response. -message FetchStaticIpsResponse { - // list of static ips by account - repeated string static_ips = 1; - - // A token that 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; -} - -// Request message for listing connection profiles. -message ListConnectionProfilesRequest { - // Required. The parent that owns the collection of connection profiles. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Maximum number of connection profiles to return. - // If unspecified, at most 50 connection profiles will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListConnectionProfiles` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListConnectionProfiles` - // must match the call that provided the page token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -// Response message for listing connection profiles. -message ListConnectionProfilesResponse { - // List of connection profiles. - repeated ConnectionProfile connection_profiles = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a connection profile. -message GetConnectionProfileRequest { - // Required. The name of the connection profile resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; -} - -// Request message for creating a connection profile. -message CreateConnectionProfileRequest { - // Required. The parent that owns the collection of ConnectionProfiles. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Required. The connection profile identifier. - string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The connection profile resource to create. - ConnectionProfile connection_profile = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the connection profile, but don't create any - // resources. The default is false. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Create the connection profile without validating it. - bool force = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Connection profile update message. -message UpdateConnectionProfileRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // ConnectionProfile resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The connection profile to update. - ConnectionProfile connection_profile = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the connection profile, but don't update any - // resources. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Update the connection profile without validating it. - bool force = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for deleting a connection profile. -message DeleteConnectionProfileRequest { - // Required. The name of the connection profile resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for listing streams. -message ListStreamsRequest { - // Required. The parent that owns the collection of streams. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Stream" - } - ]; - - // Maximum number of streams to return. - // If unspecified, at most 50 streams will be returned. The maximum - // value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListStreams` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListStreams` - // must match the call that provided the page token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -// Response message for listing streams. -message ListStreamsResponse { - // List of streams - repeated Stream streams = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a stream. -message GetStreamRequest { - // Required. The name of the stream resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; -} - -// Request message for creating a stream. -message CreateStreamRequest { - // Required. The parent that owns the collection of streams. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Stream" - } - ]; - - // Required. The stream identifier. - string stream_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The stream resource to create. - Stream stream = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the stream, but don't create any resources. - // The default is false. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Create the stream without validating it. - bool force = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for updating a stream. -message UpdateStreamRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // stream resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The stream resource to update. - Stream stream = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the stream with the changes, without actually - // updating it. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Update the stream without validating it. - bool force = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for deleting a stream. -message DeleteStreamRequest { - // Required. The name of the stream resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for running a stream. -message RunStreamRequest { - // Required. Name of the stream resource to start, in the format: - // projects/{project_id}/locations/{location}/streams/{stream_name} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; - - // Optional. The CDC strategy of the stream. If not set, the system's default - // value will be used. - CdcStrategy cdc_strategy = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Update the stream without validating it. - bool force = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request for fetching a specific stream object. -message GetStreamObjectRequest { - // Required. The name of the stream object resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/StreamObject" - } - ]; -} - -// Request for looking up a specific stream object by its source object -// identifier. -message LookupStreamObjectRequest { - // Required. The parent stream that owns the collection of objects. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; - - // Required. The source object identifier which maps to the stream object. - SourceObjectIdentifier source_object_identifier = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request for manually initiating a backfill job for a specific stream object. -message StartBackfillJobRequest { - // Required. The name of the stream object resource to start a backfill job - // for. - string object = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/StreamObject" - } - ]; -} - -// Response for manually initiating a backfill job for a specific stream object. -message StartBackfillJobResponse { - // The stream object resource a backfill job was started for. - StreamObject object = 1; -} - -// Request for manually stopping a running backfill job for a specific stream -// object. -message StopBackfillJobRequest { - // Required. The name of the stream object resource to stop the backfill job - // for. - string object = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/StreamObject" - } - ]; -} - -// Response for manually stop a backfill job for a specific stream object. -message StopBackfillJobResponse { - // The stream object resource the backfill job was stopped for. - StreamObject object = 1; -} - -// Request for listing all objects for a specific stream. -message ListStreamObjectsRequest { - // Required. The parent stream that owns the collection of objects. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/StreamObject" - } - ]; - - // Maximum number of objects to return. Default is 50. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListStreamObjectsRequest` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to - // `ListStreamObjectsRequest` must match the call that provided the page - // token. - string page_token = 3; -} - -// Response containing the objects for a stream. -message ListStreamObjectsResponse { - // List of stream objects. - repeated StreamObject stream_objects = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - string next_page_token = 2; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the user has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have - // [google.longrunning.Operation.error][google.longrunning.Operation.error] - // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Results of executed validations if there are any. - ValidationResult validation_result = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request for creating a private connection. -message CreatePrivateConnectionRequest { - // Required. The parent that owns the collection of PrivateConnections. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Required. The private connectivity identifier. - string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Private Connectivity resource to create. - PrivateConnection private_connection = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, will skip validations. - bool force = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request for listing private connections. -message ListPrivateConnectionsRequest { - // Required. The parent that owns the collection of private connectivity - // configurations. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Maximum number of private connectivity configurations to return. - // If unspecified, at most 50 private connectivity configurations that will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2; - - // Page token received from a previous `ListPrivateConnections` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to - // `ListPrivateConnections` must match the call that provided the page - // token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -// Response containing a list of private connection configurations. -message ListPrivateConnectionsResponse { - // List of private connectivity configurations. - repeated PrivateConnection private_connections = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request to delete a private connection. -message DeletePrivateConnectionRequest { - // Required. The name of the private connectivity configuration to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, any child routes that belong to this - // PrivateConnection will also be deleted. - bool force = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request to get a private connection configuration. -message GetPrivateConnectionRequest { - // Required. The name of the private connectivity configuration to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/PrivateConnection" - } - ]; -} - -// Route creation request. -message CreateRouteRequest { - // Required. The parent that owns the collection of Routes. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Route" - } - ]; - - // Required. The Route identifier. - string route_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Route resource to create. - Route route = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Route list request. -message ListRoutesRequest { - // Required. The parent that owns the collection of Routess. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Route" - } - ]; - - // Maximum number of Routes to return. The service may return - // fewer than this value. If unspecified, at most 50 Routes - // will be returned. The maximum value is 1000; values above 1000 will be - // coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListRoutes` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to - // `ListRoutes` must match the call that provided the page - // token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -// Route list response. -message ListRoutesResponse { - // List of Routes. - repeated Route routes = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Route deletion request. -message DeleteRouteRequest { - // Required. The name of the Route resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Route" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Route get request. -message GetRouteRequest { - // Required. The name of the Route resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Route" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream_resources.proto b/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream_resources.proto deleted file mode 100644 index 26118064528..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/protos/google/cloud/datastream/v1/datastream_resources.proto +++ /dev/null @@ -1,1459 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datastream.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Datastream.V1"; -option go_package = "cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb"; -option java_multiple_files = true; -option java_outer_classname = "DatastreamResourcesProto"; -option java_package = "com.google.cloud.datastream.v1"; -option php_namespace = "Google\\Cloud\\Datastream\\V1"; -option ruby_package = "Google::Cloud::Datastream::V1"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Networks" - pattern: "projects/{project}/global/networks/{network}" -}; - -// Oracle database profile. -// Next ID: 10. -message OracleProfile { - // Required. Hostname for the Oracle connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the Oracle connection, default value is 1521. - int32 port = 2; - - // Required. Username for the Oracle connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Password for the Oracle connection. Mutually exclusive with the - // `secret_manager_stored_password` field. - string password = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Database for the Oracle connection. - string database_service = 5 [(google.api.field_behavior) = REQUIRED]; - - // Connection string attributes - map connection_attributes = 6; - - // Optional. SSL configuration for the Oracle connection. - OracleSslConfig oracle_ssl_config = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for Oracle ASM connection. - OracleAsmConfig oracle_asm_config = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A reference to a Secret Manager resource name storing the Oracle - // connection password. Mutually exclusive with the `password` field. - string secret_manager_stored_password = 9 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for Oracle Automatic Storage Management (ASM) connection. -// . -message OracleAsmConfig { - // Required. Hostname for the Oracle ASM connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Port for the Oracle ASM connection. - int32 port = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Username for the Oracle ASM connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Password for the Oracle ASM connection. - string password = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. ASM service name for the Oracle ASM connection. - string asm_service = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Connection string attributes - map connection_attributes = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SSL configuration for the Oracle connection. - OracleSslConfig oracle_ssl_config = 7 - [(google.api.field_behavior) = OPTIONAL]; -} - -// MySQL database profile. -// Next ID: 7. -message MysqlProfile { - // Required. Hostname for the MySQL connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the MySQL connection, default value is 3306. - int32 port = 2; - - // Required. Username for the MySQL connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Input only. Password for the MySQL connection. Mutually exclusive - // with the `secret_manager_stored_password` field. - string password = 4 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // SSL configuration for the MySQL connection. - MysqlSslConfig ssl_config = 5; -} - -// PostgreSQL database profile. -message PostgresqlProfile { - // Required. Hostname for the PostgreSQL connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the PostgreSQL connection, default value is 5432. - int32 port = 2; - - // Required. Username for the PostgreSQL connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Password for the PostgreSQL connection. Mutually exclusive with - // the `secret_manager_stored_password` field. - string password = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Database for the PostgreSQL connection. - string database = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. SSL configuration for the PostgreSQL connection. - // In case PostgresqlSslConfig is not set, the connection will use the default - // SSL mode, which is `prefer` (i.e. this mode will only use encryption if - // enabled from database side, otherwise will use unencrypted communication) - PostgresqlSslConfig ssl_config = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// SQLServer database profile. -// Next ID: 8. -message SqlServerProfile { - // Required. Hostname for the SQLServer connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the SQLServer connection, default value is 1433. - int32 port = 2; - - // Required. Username for the SQLServer connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Password for the SQLServer connection. Mutually exclusive with - // the `secret_manager_stored_password` field. - string password = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Database for the SQLServer connection. - string database = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// Cloud Storage bucket profile. -message GcsProfile { - // Required. The Cloud Storage bucket name. - string bucket = 1 [(google.api.field_behavior) = REQUIRED]; - - // The root path inside the Cloud Storage bucket. - string root_path = 2; -} - -// BigQuery warehouse profile. -message BigQueryProfile {} - -// Static IP address connectivity. Used when the source database is configured -// to allow incoming connections from the Datastream public IP addresses -// for the region specified in the connection profile. -message StaticServiceIpConnectivity {} - -// Forward SSH Tunnel connectivity. -message ForwardSshTunnelConnectivity { - // Required. Hostname for the SSH tunnel. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Username for the SSH tunnel. - string username = 2 [(google.api.field_behavior) = REQUIRED]; - - // Port for the SSH tunnel, default value is 22. - int32 port = 3; - - oneof authentication_method { - // Input only. SSH password. - string password = 100 [(google.api.field_behavior) = INPUT_ONLY]; - - // Input only. SSH private key. - string private_key = 101 [(google.api.field_behavior) = INPUT_ONLY]; - } -} - -// The VPC Peering configuration is used to create VPC peering between -// Datastream and the consumer's VPC. -message VpcPeeringConfig { - // Required. Fully qualified name of the VPC that Datastream will peer to. - // Format: `projects/{project}/global/{networks}/{name}` - string vpc = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Networks" - } - ]; - - // Required. A free subnet for peering. (CIDR of /29) - string subnet = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The PrivateConnection resource is used to establish private connectivity -// between Datastream and a customer's network. -message PrivateConnection { - option (google.api.resource) = { - type: "datastream.googleapis.com/PrivateConnection" - pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}" - }; - - // Private Connection state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // The private connection is in creation state - creating resources. - CREATING = 1; - - // The private connection has been created with all of its resources. - CREATED = 2; - - // The private connection creation has failed. - FAILED = 3; - - // The private connection is being deleted. - DELETING = 4; - - // Delete request has failed, resource is in invalid state. - FAILED_TO_DELETE = 5; - } - - // Output only. Identifier. The resource's name. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The state of the Private Connection. - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. In case of error, the details of the error in a user-friendly - // format. - Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // VPC Peering Config. - VpcPeeringConfig vpc_peering_config = 100; -} - -// Private Connectivity -message PrivateConnectivity { - // Required. A reference to a private connection resource. - // Format: `projects/{project}/locations/{location}/privateConnections/{name}` - string private_connection = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/PrivateConnection" - } - ]; -} - -// The route resource is the child of the private connection resource, -// used for defining a route for a private connection. -message Route { - option (google.api.resource) = { - type: "datastream.googleapis.com/Route" - pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" - }; - - // Output only. Identifier. The resource's name. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination address for connection - string destination_address = 6 [(google.api.field_behavior) = REQUIRED]; - - // Destination port for connection - int32 destination_port = 7; -} - -// MySQL SSL configuration information. -message MysqlSslConfig { - // Input only. PEM-encoded private key associated with the Client Certificate. - // If this field is used then the 'client_certificate' and the - // 'ca_certificate' fields are mandatory. - string client_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the client_key field is set. - bool client_key_set = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. PEM-encoded certificate that will be used by the replica to - // authenticate against the source database server. If this field is used - // then the 'client_key' and the 'ca_certificate' fields are mandatory. - string client_certificate = 3 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the client_certificate field is set. - bool client_certificate_set = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. PEM-encoded certificate of the CA that signed the source - // database server's certificate. - string ca_certificate = 5 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the ca_certificate field is set. - bool ca_certificate_set = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Oracle SSL configuration information. -message OracleSslConfig { - // Input only. PEM-encoded certificate of the CA that signed the source - // database server's certificate. - string ca_certificate = 1 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the ca_certificate field has been set for - // this Connection-Profile. - bool ca_certificate_set = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// PostgreSQL SSL configuration information. -message PostgresqlSslConfig { - // Message represents the option where Datastream will enforce the encryption - // and authenticate the server identity. ca_certificate must be set if user - // selects this option. - message ServerVerification { - // Required. Input only. PEM-encoded server root CA certificate. - string ca_certificate = 1 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = REQUIRED - ]; - } - - // Message represents the option where Datastream will enforce the encryption - // and authenticate the server identity as well as the client identity. - // ca_certificate, client_certificate and client_key must be set if user - // selects this option. - message ServerAndClientVerification { - // Required. Input only. PEM-encoded certificate used by the source database - // to authenticate the client identity (i.e., the Datastream's identity). - // This certificate is signed by either a root certificate trusted by the - // server or one or more intermediate certificates (which is stored with the - // leaf certificate) to link the this certificate to the trusted root - // certificate. - string client_certificate = 1 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = REQUIRED - ]; - - // Required. Input only. PEM-encoded private key associated with the client - // certificate. This value will be used during the SSL/TLS handshake, - // allowing the PostgreSQL server to authenticate the client's identity, - // i.e. identity of the Datastream. - string client_key = 2 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = REQUIRED - ]; - - // Required. Input only. PEM-encoded server root CA certificate. - string ca_certificate = 3 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = REQUIRED - ]; - } - - // The encryption settings available for PostgreSQL connection profiles. - // This captures various SSL mode supported by PostgreSQL, which includes - // TLS encryption with server verification, TLS encryption with both server - // and client verification and no TLS encryption. - oneof encryption_setting { - //  If this field is set, the communication will be encrypted with TLS - // encryption and the server identity will be authenticated. - ServerVerification server_verification = 1; - - // If this field is set, the communication will be encrypted with TLS - // encryption and both the server identity and the client identity will be - // authenticated. - ServerAndClientVerification server_and_client_verification = 2; - } -} - -// A set of reusable connection configurations to be used as a source or -// destination for a stream. -message ConnectionProfile { - option (google.api.resource) = { - type: "datastream.googleapis.com/ConnectionProfile" - pattern: "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" - }; - - // Output only. Identifier. The resource's name. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Connection configuration for the ConnectionProfile. - oneof profile { - // Oracle ConnectionProfile configuration. - OracleProfile oracle_profile = 100; - - // Cloud Storage ConnectionProfile configuration. - GcsProfile gcs_profile = 101; - - // MySQL ConnectionProfile configuration. - MysqlProfile mysql_profile = 102; - - // BigQuery Connection Profile configuration. - BigQueryProfile bigquery_profile = 103; - - // PostgreSQL Connection Profile configuration. - PostgresqlProfile postgresql_profile = 104; - - // SQLServer Connection Profile configuration. - SqlServerProfile sql_server_profile = 105; - } - - // Connectivity options used to establish a connection to the profile. - oneof connectivity { - // Static Service IP connectivity. - StaticServiceIpConnectivity static_service_ip_connectivity = 200; - - // Forward SSH tunnel connectivity. - ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; - - // Private connectivity. - PrivateConnectivity private_connectivity = 202; - } -} - -// Oracle Column. -message OracleColumn { - // Column name. - string column = 1; - - // The Oracle data type. - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column precision. - int32 precision = 4; - - // Column scale. - int32 scale = 5; - - // Column encoding. - string encoding = 6; - - // Whether or not the column represents a primary key. - bool primary_key = 7; - - // Whether or not the column can accept a null value. - bool nullable = 8; - - // The ordinal position of the column in the table. - int32 ordinal_position = 9; -} - -// Oracle table. -message OracleTable { - // Table name. - string table = 1; - - // Oracle columns in the schema. - // When unspecified as part of include/exclude objects, includes/excludes - // everything. - repeated OracleColumn oracle_columns = 2; -} - -// Oracle schema. -message OracleSchema { - // Schema name. - string schema = 1; - - // Tables in the schema. - repeated OracleTable oracle_tables = 2; -} - -// Oracle database structure. -message OracleRdbms { - // Oracle schemas/databases in the database server. - repeated OracleSchema oracle_schemas = 1; -} - -// Oracle data source configuration -message OracleSourceConfig { - // Configuration to drop large object values. - message DropLargeObjects {} - - // Configuration to stream large object values. - message StreamLargeObjects {} - - // Configuration to use LogMiner CDC method. - message LogMiner {} - - // Configuration to use Binary Log Parser CDC technique. - message BinaryLogParser { - // Configuration to use Oracle ASM to access the log files. - message OracleAsmLogFileAccess {} - - // Configuration to specify the Oracle directories to access the log files. - message LogFileDirectories { - // Required. Oracle directory for online logs. - string online_log_directory = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Oracle directory for archived logs. - string archived_log_directory = 2 - [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration to specify how the log file should be accessed. - oneof log_file_access { - // Use Oracle ASM. - OracleAsmLogFileAccess oracle_asm_log_file_access = 1; - - // Use Oracle directories. - LogFileDirectories log_file_directories = 2; - } - } - - // Oracle objects to include in the stream. - OracleRdbms include_objects = 1; - - // Oracle objects to exclude from the stream. - OracleRdbms exclude_objects = 2; - - // Maximum number of concurrent CDC tasks. The number should be non-negative. - // If not set (or set to 0), the system's default value is used. - int32 max_concurrent_cdc_tasks = 3; - - // Maximum number of concurrent backfill tasks. The number should be - // non-negative. If not set (or set to 0), the system's default value is used. - int32 max_concurrent_backfill_tasks = 4; - - // The configuration for handle Oracle large objects. - oneof large_objects_handling { - // Drop large object values. - DropLargeObjects drop_large_objects = 100; - - // Stream large object values. - StreamLargeObjects stream_large_objects = 102; - } - - // Configuration to select the CDC method. - oneof cdc_method { - // Use LogMiner. - LogMiner log_miner = 103; - - // Use Binary Log Parser. - BinaryLogParser binary_log_parser = 104; - } -} - -// PostgreSQL Column. -message PostgresqlColumn { - // Column name. - string column = 1; - - // The PostgreSQL data type. - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column precision. - int32 precision = 4; - - // Column scale. - int32 scale = 5; - - // Whether or not the column represents a primary key. - bool primary_key = 7; - - // Whether or not the column can accept a null value. - bool nullable = 8; - - // The ordinal position of the column in the table. - int32 ordinal_position = 9; -} - -// PostgreSQL table. -message PostgresqlTable { - // Table name. - string table = 1; - - // PostgreSQL columns in the schema. - // When unspecified as part of include/exclude objects, - // includes/excludes everything. - repeated PostgresqlColumn postgresql_columns = 2; -} - -// PostgreSQL schema. -message PostgresqlSchema { - // Schema name. - string schema = 1; - - // Tables in the schema. - repeated PostgresqlTable postgresql_tables = 2; -} - -// PostgreSQL database structure. -message PostgresqlRdbms { - // PostgreSQL schemas in the database server. - repeated PostgresqlSchema postgresql_schemas = 1; -} - -// PostgreSQL data source configuration -message PostgresqlSourceConfig { - // PostgreSQL objects to include in the stream. - PostgresqlRdbms include_objects = 1; - - // PostgreSQL objects to exclude from the stream. - PostgresqlRdbms exclude_objects = 2; - - // Required. Immutable. The name of the logical replication slot that's - // configured with the pgoutput plugin. - string replication_slot = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. The name of the publication that includes the set of all tables - // that are defined in the stream's include_objects. - string publication = 4 [(google.api.field_behavior) = REQUIRED]; - - // Maximum number of concurrent backfill tasks. The number should be non - // negative. If not set (or set to 0), the system's default value will be - // used. - int32 max_concurrent_backfill_tasks = 5; -} - -// SQLServer Column. -message SqlServerColumn { - // Column name. - string column = 1; - - // The SQLServer data type. - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column precision. - int32 precision = 4; - - // Column scale. - int32 scale = 5; - - // Whether or not the column represents a primary key. - bool primary_key = 6; - - // Whether or not the column can accept a null value. - bool nullable = 7; - - // The ordinal position of the column in the table. - int32 ordinal_position = 8; -} - -// SQLServer table. -message SqlServerTable { - // Table name. - string table = 1; - - // SQLServer columns in the schema. - // When unspecified as part of include/exclude objects, - // includes/excludes everything. - repeated SqlServerColumn columns = 2; -} - -// SQLServer schema. -message SqlServerSchema { - // Schema name. - string schema = 1; - - // Tables in the schema. - repeated SqlServerTable tables = 2; -} - -// SQLServer database structure. -message SqlServerRdbms { - // SQLServer schemas in the database server. - repeated SqlServerSchema schemas = 1; -} - -// SQLServer data source configuration -message SqlServerSourceConfig { - // SQLServer objects to include in the stream. - SqlServerRdbms include_objects = 1; - - // SQLServer objects to exclude from the stream. - SqlServerRdbms exclude_objects = 2; - - // Max concurrent CDC tasks. - int32 max_concurrent_cdc_tasks = 3; - - // Max concurrent backfill tasks. - int32 max_concurrent_backfill_tasks = 4; - - // Configuration to select the CDC read method for the stream. - oneof cdc_method { - // CDC reader reads from transaction logs. - SqlServerTransactionLogs transaction_logs = 101; - - // CDC reader reads from change tables. - SqlServerChangeTables change_tables = 102; - } -} - -// Configuration to use Transaction Logs CDC read method. -message SqlServerTransactionLogs {} - -// Configuration to use Change Tables CDC read method. -message SqlServerChangeTables {} - -// MySQL Column. -message MysqlColumn { - // Column name. - string column = 1; - - // The MySQL data type. Full data types list can be found here: - // https://dev.mysql.com/doc/refman/8.0/en/data-types.html - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column collation. - string collation = 4; - - // Whether or not the column represents a primary key. - bool primary_key = 5; - - // Whether or not the column can accept a null value. - bool nullable = 6; - - // The ordinal position of the column in the table. - int32 ordinal_position = 7; - - // Column precision. - int32 precision = 8; - - // Column scale. - int32 scale = 9; -} - -// MySQL table. -message MysqlTable { - // Table name. - string table = 1; - - // MySQL columns in the database. - // When unspecified as part of include/exclude objects, includes/excludes - // everything. - repeated MysqlColumn mysql_columns = 2; -} - -// MySQL database. -message MysqlDatabase { - // Database name. - string database = 1; - - // Tables in the database. - repeated MysqlTable mysql_tables = 2; -} - -// MySQL database structure -message MysqlRdbms { - // Mysql databases on the server - repeated MysqlDatabase mysql_databases = 1; -} - -// MySQL source configuration -message MysqlSourceConfig { - // Use Binary log position based replication. - message BinaryLogPosition {} - - // Use GTID based replication. - message Gtid {} - - // MySQL objects to retrieve from the source. - MysqlRdbms include_objects = 1; - - // MySQL objects to exclude from the stream. - MysqlRdbms exclude_objects = 2; - - // Maximum number of concurrent CDC tasks. The number should be non negative. - // If not set (or set to 0), the system's default value will be used. - int32 max_concurrent_cdc_tasks = 3; - - // Maximum number of concurrent backfill tasks. The number should be non - // negative. If not set (or set to 0), the system's default value will be - // used. - int32 max_concurrent_backfill_tasks = 4; - - // The CDC method to use for the stream. - oneof cdc_method { - // Use Binary log position based replication. - BinaryLogPosition binary_log_position = 101; - - // Use GTID based replication. - Gtid gtid = 102; - } -} - -// The configuration of the stream source. -message SourceConfig { - // Required. Source connection profile resoource. - // Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - string source_connection_profile = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Stream configuration that is specific to the data source type. - oneof source_stream_config { - // Oracle data source configuration. - OracleSourceConfig oracle_source_config = 100; - - // MySQL data source configuration. - MysqlSourceConfig mysql_source_config = 101; - - // PostgreSQL data source configuration. - PostgresqlSourceConfig postgresql_source_config = 102; - - // SQLServer data source configuration. - SqlServerSourceConfig sql_server_source_config = 103; - } -} - -// AVRO file format configuration. -message AvroFileFormat {} - -// JSON file format configuration. -message JsonFileFormat { - // Schema file format. - enum SchemaFileFormat { - // Unspecified schema file format. - SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; - - // Do not attach schema file. - NO_SCHEMA_FILE = 1; - - // Avro schema format. - AVRO_SCHEMA_FILE = 2; - } - - // Json file compression. - enum JsonCompression { - // Unspecified json file compression. - JSON_COMPRESSION_UNSPECIFIED = 0; - - // Do not compress JSON file. - NO_COMPRESSION = 1; - - // Gzip compression. - GZIP = 2; - } - - // The schema file format along JSON data files. - SchemaFileFormat schema_file_format = 1; - - // Compression of the loaded JSON file. - JsonCompression compression = 2; -} - -// Google Cloud Storage destination configuration -message GcsDestinationConfig { - // Path inside the Cloud Storage bucket to write data to. - string path = 1; - - // The maximum file size to be saved in the bucket. - int32 file_rotation_mb = 2; - - // The maximum duration for which new events are added before a file is - // closed and a new file is created. Values within the range of 15-60 seconds - // are allowed. - google.protobuf.Duration file_rotation_interval = 3; - - // File Format that the data should be written in. - oneof file_format { - // AVRO file format configuration. - AvroFileFormat avro_file_format = 100; - - // JSON file format configuration. - JsonFileFormat json_file_format = 101; - } -} - -// BigQuery destination configuration -message BigQueryDestinationConfig { - // A single target dataset to which all data will be streamed. - message SingleTargetDataset { - // The dataset ID of the target dataset. - // DatasetIds allowed characters: - // https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. - string dataset_id = 1; - } - - // Destination datasets are created so that hierarchy of the destination data - // objects matches the source hierarchy. - message SourceHierarchyDatasets { - // Dataset template used for dynamic dataset creation. - message DatasetTemplate { - // Required. The geographic location where the dataset should reside. See - // https://cloud.google.com/bigquery/docs/locations for supported - // locations. - string location = 1 [(google.api.field_behavior) = REQUIRED]; - - // If supplied, every created dataset will have its name prefixed by the - // provided value. The prefix and name will be separated by an underscore. - // i.e. _. - string dataset_id_prefix = 2; - - // Describes the Cloud KMS encryption key that will be used to - // protect destination BigQuery table. The BigQuery Service Account - // associated with your project requires access to this encryption key. - // i.e. - // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. - // See https://cloud.google.com/bigquery/docs/customer-managed-encryption - // for more information. - string kms_key_name = 3; - } - - // The dataset template to use for dynamic dataset creation. - DatasetTemplate dataset_template = 2; - } - - // AppendOnly mode defines that all changes to a table will be written to the - // destination table. - message AppendOnly {} - - // Merge mode defines that all changes to a table will be merged at the - // destination table. - message Merge {} - - // Target dataset(s) configuration. - oneof dataset_config { - // Single destination dataset. - SingleTargetDataset single_target_dataset = 201; - - // Source hierarchy datasets. - SourceHierarchyDatasets source_hierarchy_datasets = 202; - } - - // The guaranteed data freshness (in seconds) when querying tables created by - // the stream. Editing this field will only affect new tables created in the - // future, but existing tables will not be impacted. Lower values mean that - // queries will return fresher data, but may result in higher cost. - google.protobuf.Duration data_freshness = 300; - - oneof write_mode { - // The standard mode - Merge merge = 301; - - // Append only mode - AppendOnly append_only = 302; - } -} - -// The configuration of the stream destination. -message DestinationConfig { - // Required. Destination connection profile resource. - // Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - string destination_connection_profile = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Stream configuration that is specific to the data destination type. - oneof destination_stream_config { - // A configuration for how data should be loaded to Cloud Storage. - GcsDestinationConfig gcs_destination_config = 100; - - // BigQuery destination configuration. - BigQueryDestinationConfig bigquery_destination_config = 101; - } -} - -// A resource representing streaming data from a source to a destination. -message Stream { - option (google.api.resource) = { - type: "datastream.googleapis.com/Stream" - pattern: "projects/{project}/locations/{location}/streams/{stream}" - }; - - // Stream state. - enum State { - // Unspecified stream state. - STATE_UNSPECIFIED = 0; - - // The stream has been created but has not yet started streaming data. - NOT_STARTED = 1; - - // The stream is running. - RUNNING = 2; - - // The stream is paused. - PAUSED = 3; - - // The stream is in maintenance mode. - // - // Updates are rejected on the resource in this state. - MAINTENANCE = 4; - - // The stream is experiencing an error that is preventing data from being - // streamed. - FAILED = 5; - - // The stream has experienced a terminal failure. - FAILED_PERMANENTLY = 6; - - // The stream is starting, but not yet running. - STARTING = 7; - - // The Stream is no longer reading new events, but still writing events in - // the buffer. - DRAINING = 8; - } - - // Backfill strategy to automatically backfill the Stream's objects. - // Specific objects can be excluded. - message BackfillAllStrategy { - // List of objects to exclude. - oneof excluded_objects { - // Oracle data source objects to avoid backfilling. - OracleRdbms oracle_excluded_objects = 1; - - // MySQL data source objects to avoid backfilling. - MysqlRdbms mysql_excluded_objects = 2; - - // PostgreSQL data source objects to avoid backfilling. - PostgresqlRdbms postgresql_excluded_objects = 3; - - // SQLServer data source objects to avoid backfilling - SqlServerRdbms sql_server_excluded_objects = 4; - } - } - - // Backfill strategy to disable automatic backfill for the Stream's objects. - message BackfillNoneStrategy {} - - // Output only. Identifier. The stream's name. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The creation time of the stream. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of the stream. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Source connection profile configuration. - SourceConfig source_config = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination connection profile configuration. - DestinationConfig destination_config = 7 - [(google.api.field_behavior) = REQUIRED]; - - // The state of the stream. - State state = 8; - - // Stream backfill strategy. - oneof backfill_strategy { - // Automatically backfill objects included in the stream source - // configuration. Specific objects can be excluded. - BackfillAllStrategy backfill_all = 101; - - // Do not automatically backfill any objects. - BackfillNoneStrategy backfill_none = 102; - } - - // Output only. Errors on the Stream. - repeated Error errors = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Immutable. A reference to a KMS encryption key. - // If provided, it will be used to encrypt the data. - // If left blank, data will be encrypted using an internal Stream-specific - // encryption key provisioned through KMS. - optional string customer_managed_encryption_key = 10 - [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. If the stream was recovered, the time of the last recovery. - // Note: This field is currently experimental. - google.protobuf.Timestamp last_recovery_time = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A specific stream object (e.g a specific DB table). -message StreamObject { - option (google.api.resource) = { - type: "datastream.googleapis.com/StreamObject" - pattern: "projects/{project}/locations/{location}/streams/{stream}/objects/{object}" - }; - - // Output only. Identifier. The object resource's name. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The creation time of the object. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of the object. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Active errors on the object. - repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The latest backfill job that was initiated for the stream object. - BackfillJob backfill_job = 7; - - // The object identifier in the data source. - SourceObjectIdentifier source_object = 8; -} - -// Represents an identifier of an object in the data source. -message SourceObjectIdentifier { - // Oracle data source object identifier. - message OracleObjectIdentifier { - // Required. The schema name. - string schema = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The table name. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // PostgreSQL data source object identifier. - message PostgresqlObjectIdentifier { - // Required. The schema name. - string schema = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The table name. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Mysql data source object identifier. - message MysqlObjectIdentifier { - // Required. The database name. - string database = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The table name. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // SQLServer data source object identifier. - message SqlServerObjectIdentifier { - // Required. The schema name. - string schema = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The table name. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // The identifier for an object in the data source. - oneof source_identifier { - // Oracle data source object identifier. - OracleObjectIdentifier oracle_identifier = 1; - - // Mysql data source object identifier. - MysqlObjectIdentifier mysql_identifier = 2; - - // PostgreSQL data source object identifier. - PostgresqlObjectIdentifier postgresql_identifier = 3; - - // SQLServer data source object identifier. - SqlServerObjectIdentifier sql_server_identifier = 4; - } -} - -// Represents a backfill job on a specific stream object. -message BackfillJob { - // State of the stream object's backfill job. - enum State { - // Default value. - STATE_UNSPECIFIED = 0; - - // Backfill job was never started for the stream object (stream has backfill - // strategy defined as manual or object was explicitly excluded from - // automatic backfill). - NOT_STARTED = 1; - - // Backfill job will start pending available resources. - PENDING = 2; - - // Backfill job is running. - ACTIVE = 3; - - // Backfill job stopped (next job run will start from beginning). - STOPPED = 4; - - // Backfill job failed (due to an error). - FAILED = 5; - - // Backfill completed successfully. - COMPLETED = 6; - - // Backfill job failed since the table structure is currently unsupported - // for backfill. - UNSUPPORTED = 7; - } - - // Triggering reason for a backfill job. - enum Trigger { - // Default value. - TRIGGER_UNSPECIFIED = 0; - - // Object backfill job was triggered automatically according to the stream's - // backfill strategy. - AUTOMATIC = 1; - - // Object backfill job was triggered manually using the dedicated API. - MANUAL = 2; - } - - // Output only. Backfill job state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Backfill job's triggering reason. - Trigger trigger = 2; - - // Output only. Backfill job's start time. - google.protobuf.Timestamp last_start_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Backfill job's end time. - google.protobuf.Timestamp last_end_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Errors which caused the backfill job to fail. - repeated Error errors = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represent a user-facing Error. -message Error { - // A title that explains the reason for the error. - string reason = 1; - - // A unique identifier for this specific error, - // allowing it to be traced throughout the system in logs and API responses. - string error_uuid = 2; - - // A message containing more information about the error that occurred. - string message = 3; - - // The time when the error occurred. - google.protobuf.Timestamp error_time = 4; - - // Additional information about the error. - map details = 5; -} - -// Contains the current validation results. -message ValidationResult { - // A list of validations (includes both executed as well as not executed - // validations). - repeated Validation validations = 1; -} - -// A validation to perform on a stream. -message Validation { - // Validation execution state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // Validation did not execute. - NOT_EXECUTED = 1; - - // Validation failed. - FAILED = 2; - - // Validation passed. - PASSED = 3; - - // Validation executed with warnings. - WARNING = 4; - } - - // A short description of the validation. - string description = 1; - - // Output only. Validation execution status. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Messages reflecting the validation results. - repeated ValidationMessage message = 3; - - // A custom code identifying this validation. - string code = 4; -} - -// Represent user-facing validation result message. -message ValidationMessage { - // Validation message level. - enum Level { - // Unspecified level. - LEVEL_UNSPECIFIED = 0; - - // Potentially cause issues with the Stream. - WARNING = 1; - - // Definitely cause issues with the Stream. - ERROR = 2; - } - - // The result of the validation. - string message = 1; - - // Message severity level (warning or error). - Level level = 2; - - // Additional metadata related to the result. - map metadata = 3; - - // A custom code identifying this specific message. - string code = 4; -} - -// The strategy that the stream uses for CDC replication. -message CdcStrategy { - // CDC strategy to start replicating from the most recent position in the - // source. - message MostRecentStartPosition {} - - // CDC strategy to resume replication from the next available position in the - // source. - message NextAvailableStartPosition {} - - // CDC strategy to start replicating from a specific position in the source. - message SpecificStartPosition { - oneof position { - // MySQL specific log position to start replicating from. - MysqlLogPosition mysql_log_position = 101; - - // Oracle SCN to start replicating from. - OracleScnPosition oracle_scn_position = 102; - - // SqlServer LSN to start replicating from. - SqlServerLsnPosition sql_server_lsn_position = 103; - } - } - - // The position to start reading from when starting, resuming, or recovering - // the stream. - // If not set, the system's default value will be used. - oneof start_position { - // Optional. Start replicating from the most recent position in the source. - MostRecentStartPosition most_recent_start_position = 101 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resume replication from the next available position in the - // source. - NextAvailableStartPosition next_available_start_position = 102 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Start replicating from a specific position in the source. - SpecificStartPosition specific_start_position = 103 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// SQL Server LSN position -message SqlServerLsnPosition { - // Required. Log sequence number (LSN) from where Logs will be read - string lsn = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Oracle SCN position -message OracleScnPosition { - // Required. SCN number from where Logs will be read - int64 scn = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// MySQL log position -message MysqlLogPosition { - // Required. The binary log file name. - string log_file = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The position within the binary log file. Default is head of file. - optional int32 log_position = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datastream/v1/protos/protos.d.ts deleted file mode 100644 index c75ca7aa74c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/protos/protos.d.ts +++ /dev/null @@ -1,21503 +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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace datastream. */ - namespace datastream { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Datastream */ - class Datastream extends $protobuf.rpc.Service { - - /** - * Constructs a new Datastream 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 Datastream 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): Datastream; - - /** - * Calls ListConnectionProfiles. - * @param request ListConnectionProfilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectionProfilesResponse - */ - public listConnectionProfiles(request: google.cloud.datastream.v1.IListConnectionProfilesRequest, callback: google.cloud.datastream.v1.Datastream.ListConnectionProfilesCallback): void; - - /** - * Calls ListConnectionProfiles. - * @param request ListConnectionProfilesRequest message or plain object - * @returns Promise - */ - public listConnectionProfiles(request: google.cloud.datastream.v1.IListConnectionProfilesRequest): Promise; - - /** - * Calls GetConnectionProfile. - * @param request GetConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectionProfile - */ - public getConnectionProfile(request: google.cloud.datastream.v1.IGetConnectionProfileRequest, callback: google.cloud.datastream.v1.Datastream.GetConnectionProfileCallback): void; - - /** - * Calls GetConnectionProfile. - * @param request GetConnectionProfileRequest message or plain object - * @returns Promise - */ - public getConnectionProfile(request: google.cloud.datastream.v1.IGetConnectionProfileRequest): Promise; - - /** - * Calls CreateConnectionProfile. - * @param request CreateConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectionProfile(request: google.cloud.datastream.v1.ICreateConnectionProfileRequest, callback: google.cloud.datastream.v1.Datastream.CreateConnectionProfileCallback): void; - - /** - * Calls CreateConnectionProfile. - * @param request CreateConnectionProfileRequest message or plain object - * @returns Promise - */ - public createConnectionProfile(request: google.cloud.datastream.v1.ICreateConnectionProfileRequest): Promise; - - /** - * Calls UpdateConnectionProfile. - * @param request UpdateConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectionProfile(request: google.cloud.datastream.v1.IUpdateConnectionProfileRequest, callback: google.cloud.datastream.v1.Datastream.UpdateConnectionProfileCallback): void; - - /** - * Calls UpdateConnectionProfile. - * @param request UpdateConnectionProfileRequest message or plain object - * @returns Promise - */ - public updateConnectionProfile(request: google.cloud.datastream.v1.IUpdateConnectionProfileRequest): Promise; - - /** - * Calls DeleteConnectionProfile. - * @param request DeleteConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectionProfile(request: google.cloud.datastream.v1.IDeleteConnectionProfileRequest, callback: google.cloud.datastream.v1.Datastream.DeleteConnectionProfileCallback): void; - - /** - * Calls DeleteConnectionProfile. - * @param request DeleteConnectionProfileRequest message or plain object - * @returns Promise - */ - public deleteConnectionProfile(request: google.cloud.datastream.v1.IDeleteConnectionProfileRequest): Promise; - - /** - * Calls DiscoverConnectionProfile. - * @param request DiscoverConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DiscoverConnectionProfileResponse - */ - public discoverConnectionProfile(request: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, callback: google.cloud.datastream.v1.Datastream.DiscoverConnectionProfileCallback): void; - - /** - * Calls DiscoverConnectionProfile. - * @param request DiscoverConnectionProfileRequest message or plain object - * @returns Promise - */ - public discoverConnectionProfile(request: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest): Promise; - - /** - * Calls ListStreams. - * @param request ListStreamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListStreamsResponse - */ - public listStreams(request: google.cloud.datastream.v1.IListStreamsRequest, callback: google.cloud.datastream.v1.Datastream.ListStreamsCallback): void; - - /** - * Calls ListStreams. - * @param request ListStreamsRequest message or plain object - * @returns Promise - */ - public listStreams(request: google.cloud.datastream.v1.IListStreamsRequest): Promise; - - /** - * Calls GetStream. - * @param request GetStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Stream - */ - public getStream(request: google.cloud.datastream.v1.IGetStreamRequest, callback: google.cloud.datastream.v1.Datastream.GetStreamCallback): void; - - /** - * Calls GetStream. - * @param request GetStreamRequest message or plain object - * @returns Promise - */ - public getStream(request: google.cloud.datastream.v1.IGetStreamRequest): Promise; - - /** - * Calls CreateStream. - * @param request CreateStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createStream(request: google.cloud.datastream.v1.ICreateStreamRequest, callback: google.cloud.datastream.v1.Datastream.CreateStreamCallback): void; - - /** - * Calls CreateStream. - * @param request CreateStreamRequest message or plain object - * @returns Promise - */ - public createStream(request: google.cloud.datastream.v1.ICreateStreamRequest): Promise; - - /** - * Calls UpdateStream. - * @param request UpdateStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateStream(request: google.cloud.datastream.v1.IUpdateStreamRequest, callback: google.cloud.datastream.v1.Datastream.UpdateStreamCallback): void; - - /** - * Calls UpdateStream. - * @param request UpdateStreamRequest message or plain object - * @returns Promise - */ - public updateStream(request: google.cloud.datastream.v1.IUpdateStreamRequest): Promise; - - /** - * Calls DeleteStream. - * @param request DeleteStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteStream(request: google.cloud.datastream.v1.IDeleteStreamRequest, callback: google.cloud.datastream.v1.Datastream.DeleteStreamCallback): void; - - /** - * Calls DeleteStream. - * @param request DeleteStreamRequest message or plain object - * @returns Promise - */ - public deleteStream(request: google.cloud.datastream.v1.IDeleteStreamRequest): Promise; - - /** - * Calls RunStream. - * @param request RunStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public runStream(request: google.cloud.datastream.v1.IRunStreamRequest, callback: google.cloud.datastream.v1.Datastream.RunStreamCallback): void; - - /** - * Calls RunStream. - * @param request RunStreamRequest message or plain object - * @returns Promise - */ - public runStream(request: google.cloud.datastream.v1.IRunStreamRequest): Promise; - - /** - * Calls GetStreamObject. - * @param request GetStreamObjectRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StreamObject - */ - public getStreamObject(request: google.cloud.datastream.v1.IGetStreamObjectRequest, callback: google.cloud.datastream.v1.Datastream.GetStreamObjectCallback): void; - - /** - * Calls GetStreamObject. - * @param request GetStreamObjectRequest message or plain object - * @returns Promise - */ - public getStreamObject(request: google.cloud.datastream.v1.IGetStreamObjectRequest): Promise; - - /** - * Calls LookupStreamObject. - * @param request LookupStreamObjectRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StreamObject - */ - public lookupStreamObject(request: google.cloud.datastream.v1.ILookupStreamObjectRequest, callback: google.cloud.datastream.v1.Datastream.LookupStreamObjectCallback): void; - - /** - * Calls LookupStreamObject. - * @param request LookupStreamObjectRequest message or plain object - * @returns Promise - */ - public lookupStreamObject(request: google.cloud.datastream.v1.ILookupStreamObjectRequest): Promise; - - /** - * Calls ListStreamObjects. - * @param request ListStreamObjectsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListStreamObjectsResponse - */ - public listStreamObjects(request: google.cloud.datastream.v1.IListStreamObjectsRequest, callback: google.cloud.datastream.v1.Datastream.ListStreamObjectsCallback): void; - - /** - * Calls ListStreamObjects. - * @param request ListStreamObjectsRequest message or plain object - * @returns Promise - */ - public listStreamObjects(request: google.cloud.datastream.v1.IListStreamObjectsRequest): Promise; - - /** - * Calls StartBackfillJob. - * @param request StartBackfillJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StartBackfillJobResponse - */ - public startBackfillJob(request: google.cloud.datastream.v1.IStartBackfillJobRequest, callback: google.cloud.datastream.v1.Datastream.StartBackfillJobCallback): void; - - /** - * Calls StartBackfillJob. - * @param request StartBackfillJobRequest message or plain object - * @returns Promise - */ - public startBackfillJob(request: google.cloud.datastream.v1.IStartBackfillJobRequest): Promise; - - /** - * Calls StopBackfillJob. - * @param request StopBackfillJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StopBackfillJobResponse - */ - public stopBackfillJob(request: google.cloud.datastream.v1.IStopBackfillJobRequest, callback: google.cloud.datastream.v1.Datastream.StopBackfillJobCallback): void; - - /** - * Calls StopBackfillJob. - * @param request StopBackfillJobRequest message or plain object - * @returns Promise - */ - public stopBackfillJob(request: google.cloud.datastream.v1.IStopBackfillJobRequest): Promise; - - /** - * Calls FetchStaticIps. - * @param request FetchStaticIpsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchStaticIpsResponse - */ - public fetchStaticIps(request: google.cloud.datastream.v1.IFetchStaticIpsRequest, callback: google.cloud.datastream.v1.Datastream.FetchStaticIpsCallback): void; - - /** - * Calls FetchStaticIps. - * @param request FetchStaticIpsRequest message or plain object - * @returns Promise - */ - public fetchStaticIps(request: google.cloud.datastream.v1.IFetchStaticIpsRequest): Promise; - - /** - * Calls CreatePrivateConnection. - * @param request CreatePrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createPrivateConnection(request: google.cloud.datastream.v1.ICreatePrivateConnectionRequest, callback: google.cloud.datastream.v1.Datastream.CreatePrivateConnectionCallback): void; - - /** - * Calls CreatePrivateConnection. - * @param request CreatePrivateConnectionRequest message or plain object - * @returns Promise - */ - public createPrivateConnection(request: google.cloud.datastream.v1.ICreatePrivateConnectionRequest): Promise; - - /** - * Calls GetPrivateConnection. - * @param request GetPrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateConnection - */ - public getPrivateConnection(request: google.cloud.datastream.v1.IGetPrivateConnectionRequest, callback: google.cloud.datastream.v1.Datastream.GetPrivateConnectionCallback): void; - - /** - * Calls GetPrivateConnection. - * @param request GetPrivateConnectionRequest message or plain object - * @returns Promise - */ - public getPrivateConnection(request: google.cloud.datastream.v1.IGetPrivateConnectionRequest): Promise; - - /** - * Calls ListPrivateConnections. - * @param request ListPrivateConnectionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse - */ - public listPrivateConnections(request: google.cloud.datastream.v1.IListPrivateConnectionsRequest, callback: google.cloud.datastream.v1.Datastream.ListPrivateConnectionsCallback): void; - - /** - * Calls ListPrivateConnections. - * @param request ListPrivateConnectionsRequest message or plain object - * @returns Promise - */ - public listPrivateConnections(request: google.cloud.datastream.v1.IListPrivateConnectionsRequest): Promise; - - /** - * Calls DeletePrivateConnection. - * @param request DeletePrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deletePrivateConnection(request: google.cloud.datastream.v1.IDeletePrivateConnectionRequest, callback: google.cloud.datastream.v1.Datastream.DeletePrivateConnectionCallback): void; - - /** - * Calls DeletePrivateConnection. - * @param request DeletePrivateConnectionRequest message or plain object - * @returns Promise - */ - public deletePrivateConnection(request: google.cloud.datastream.v1.IDeletePrivateConnectionRequest): Promise; - - /** - * Calls CreateRoute. - * @param request CreateRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createRoute(request: google.cloud.datastream.v1.ICreateRouteRequest, callback: google.cloud.datastream.v1.Datastream.CreateRouteCallback): void; - - /** - * Calls CreateRoute. - * @param request CreateRouteRequest message or plain object - * @returns Promise - */ - public createRoute(request: google.cloud.datastream.v1.ICreateRouteRequest): Promise; - - /** - * Calls GetRoute. - * @param request GetRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Route - */ - public getRoute(request: google.cloud.datastream.v1.IGetRouteRequest, callback: google.cloud.datastream.v1.Datastream.GetRouteCallback): void; - - /** - * Calls GetRoute. - * @param request GetRouteRequest message or plain object - * @returns Promise - */ - public getRoute(request: google.cloud.datastream.v1.IGetRouteRequest): Promise; - - /** - * Calls ListRoutes. - * @param request ListRoutesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRoutesResponse - */ - public listRoutes(request: google.cloud.datastream.v1.IListRoutesRequest, callback: google.cloud.datastream.v1.Datastream.ListRoutesCallback): void; - - /** - * Calls ListRoutes. - * @param request ListRoutesRequest message or plain object - * @returns Promise - */ - public listRoutes(request: google.cloud.datastream.v1.IListRoutesRequest): Promise; - - /** - * Calls DeleteRoute. - * @param request DeleteRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteRoute(request: google.cloud.datastream.v1.IDeleteRouteRequest, callback: google.cloud.datastream.v1.Datastream.DeleteRouteCallback): void; - - /** - * Calls DeleteRoute. - * @param request DeleteRouteRequest message or plain object - * @returns Promise - */ - public deleteRoute(request: google.cloud.datastream.v1.IDeleteRouteRequest): Promise; - } - - namespace Datastream { - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listConnectionProfiles}. - * @param error Error, if any - * @param [response] ListConnectionProfilesResponse - */ - type ListConnectionProfilesCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ListConnectionProfilesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getConnectionProfile}. - * @param error Error, if any - * @param [response] ConnectionProfile - */ - type GetConnectionProfileCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ConnectionProfile) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|updateConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|discoverConnectionProfile}. - * @param error Error, if any - * @param [response] DiscoverConnectionProfileResponse - */ - type DiscoverConnectionProfileCallback = (error: (Error|null), response?: google.cloud.datastream.v1.DiscoverConnectionProfileResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listStreams}. - * @param error Error, if any - * @param [response] ListStreamsResponse - */ - type ListStreamsCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ListStreamsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStream}. - * @param error Error, if any - * @param [response] Stream - */ - type GetStreamCallback = (error: (Error|null), response?: google.cloud.datastream.v1.Stream) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createStream}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|updateStream}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteStream}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|runStream}. - * @param error Error, if any - * @param [response] Operation - */ - type RunStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStreamObject}. - * @param error Error, if any - * @param [response] StreamObject - */ - type GetStreamObjectCallback = (error: (Error|null), response?: google.cloud.datastream.v1.StreamObject) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|lookupStreamObject}. - * @param error Error, if any - * @param [response] StreamObject - */ - type LookupStreamObjectCallback = (error: (Error|null), response?: google.cloud.datastream.v1.StreamObject) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listStreamObjects}. - * @param error Error, if any - * @param [response] ListStreamObjectsResponse - */ - type ListStreamObjectsCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ListStreamObjectsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|startBackfillJob}. - * @param error Error, if any - * @param [response] StartBackfillJobResponse - */ - type StartBackfillJobCallback = (error: (Error|null), response?: google.cloud.datastream.v1.StartBackfillJobResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|stopBackfillJob}. - * @param error Error, if any - * @param [response] StopBackfillJobResponse - */ - type StopBackfillJobCallback = (error: (Error|null), response?: google.cloud.datastream.v1.StopBackfillJobResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|fetchStaticIps}. - * @param error Error, if any - * @param [response] FetchStaticIpsResponse - */ - type FetchStaticIpsCallback = (error: (Error|null), response?: google.cloud.datastream.v1.FetchStaticIpsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createPrivateConnection}. - * @param error Error, if any - * @param [response] Operation - */ - type CreatePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getPrivateConnection}. - * @param error Error, if any - * @param [response] PrivateConnection - */ - type GetPrivateConnectionCallback = (error: (Error|null), response?: google.cloud.datastream.v1.PrivateConnection) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listPrivateConnections}. - * @param error Error, if any - * @param [response] ListPrivateConnectionsResponse - */ - type ListPrivateConnectionsCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ListPrivateConnectionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deletePrivateConnection}. - * @param error Error, if any - * @param [response] Operation - */ - type DeletePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createRoute}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateRouteCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getRoute}. - * @param error Error, if any - * @param [response] Route - */ - type GetRouteCallback = (error: (Error|null), response?: google.cloud.datastream.v1.Route) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listRoutes}. - * @param error Error, if any - * @param [response] ListRoutesResponse - */ - type ListRoutesCallback = (error: (Error|null), response?: google.cloud.datastream.v1.ListRoutesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteRoute}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteRouteCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a DiscoverConnectionProfileRequest. */ - interface IDiscoverConnectionProfileRequest { - - /** DiscoverConnectionProfileRequest parent */ - parent?: (string|null); - - /** DiscoverConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** DiscoverConnectionProfileRequest connectionProfileName */ - connectionProfileName?: (string|null); - - /** DiscoverConnectionProfileRequest fullHierarchy */ - fullHierarchy?: (boolean|null); - - /** DiscoverConnectionProfileRequest hierarchyDepth */ - hierarchyDepth?: (number|null); - - /** DiscoverConnectionProfileRequest oracleRdbms */ - oracleRdbms?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** DiscoverConnectionProfileRequest mysqlRdbms */ - mysqlRdbms?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileRequest postgresqlRdbms */ - postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** DiscoverConnectionProfileRequest sqlServerRdbms */ - sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - } - - /** Represents a DiscoverConnectionProfileRequest. */ - class DiscoverConnectionProfileRequest implements IDiscoverConnectionProfileRequest { - - /** - * Constructs a new DiscoverConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest); - - /** DiscoverConnectionProfileRequest parent. */ - public parent: string; - - /** DiscoverConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** DiscoverConnectionProfileRequest connectionProfileName. */ - public connectionProfileName?: (string|null); - - /** DiscoverConnectionProfileRequest fullHierarchy. */ - public fullHierarchy?: (boolean|null); - - /** DiscoverConnectionProfileRequest hierarchyDepth. */ - public hierarchyDepth?: (number|null); - - /** DiscoverConnectionProfileRequest oracleRdbms. */ - public oracleRdbms?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** DiscoverConnectionProfileRequest mysqlRdbms. */ - public mysqlRdbms?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileRequest postgresqlRdbms. */ - public postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** DiscoverConnectionProfileRequest sqlServerRdbms. */ - public sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** DiscoverConnectionProfileRequest target. */ - public target?: ("connectionProfile"|"connectionProfileName"); - - /** DiscoverConnectionProfileRequest hierarchy. */ - public hierarchy?: ("fullHierarchy"|"hierarchyDepth"); - - /** DiscoverConnectionProfileRequest dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"); - - /** - * Creates a new DiscoverConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest): google.cloud.datastream.v1.DiscoverConnectionProfileRequest; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @param message DiscoverConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @param message DiscoverConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1.DiscoverConnectionProfileRequest; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1.DiscoverConnectionProfileRequest; - - /** - * Verifies a DiscoverConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DiscoverConnectionProfileRequest; - - /** - * Creates a plain object from a DiscoverConnectionProfileRequest message. Also converts values to other types if specified. - * @param message DiscoverConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DiscoverConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DiscoverConnectionProfileResponse. */ - interface IDiscoverConnectionProfileResponse { - - /** DiscoverConnectionProfileResponse oracleRdbms */ - oracleRdbms?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** DiscoverConnectionProfileResponse mysqlRdbms */ - mysqlRdbms?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileResponse postgresqlRdbms */ - postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** DiscoverConnectionProfileResponse sqlServerRdbms */ - sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - } - - /** Represents a DiscoverConnectionProfileResponse. */ - class DiscoverConnectionProfileResponse implements IDiscoverConnectionProfileResponse { - - /** - * Constructs a new DiscoverConnectionProfileResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDiscoverConnectionProfileResponse); - - /** DiscoverConnectionProfileResponse oracleRdbms. */ - public oracleRdbms?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** DiscoverConnectionProfileResponse mysqlRdbms. */ - public mysqlRdbms?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileResponse postgresqlRdbms. */ - public postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** DiscoverConnectionProfileResponse sqlServerRdbms. */ - public sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** DiscoverConnectionProfileResponse dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"); - - /** - * Creates a new DiscoverConnectionProfileResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverConnectionProfileResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IDiscoverConnectionProfileResponse): google.cloud.datastream.v1.DiscoverConnectionProfileResponse; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @param message DiscoverConnectionProfileResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @param message DiscoverConnectionProfileResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not 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.datastream.v1.DiscoverConnectionProfileResponse; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverConnectionProfileResponse - * @throws {Error} If the payload 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.datastream.v1.DiscoverConnectionProfileResponse; - - /** - * Verifies a DiscoverConnectionProfileResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverConnectionProfileResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverConnectionProfileResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DiscoverConnectionProfileResponse; - - /** - * Creates a plain object from a DiscoverConnectionProfileResponse message. Also converts values to other types if specified. - * @param message DiscoverConnectionProfileResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DiscoverConnectionProfileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverConnectionProfileResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverConnectionProfileResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchStaticIpsRequest. */ - interface IFetchStaticIpsRequest { - - /** FetchStaticIpsRequest name */ - name?: (string|null); - - /** FetchStaticIpsRequest pageSize */ - pageSize?: (number|null); - - /** FetchStaticIpsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a FetchStaticIpsRequest. */ - class FetchStaticIpsRequest implements IFetchStaticIpsRequest { - - /** - * Constructs a new FetchStaticIpsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IFetchStaticIpsRequest); - - /** FetchStaticIpsRequest name. */ - public name: string; - - /** FetchStaticIpsRequest pageSize. */ - public pageSize: number; - - /** FetchStaticIpsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new FetchStaticIpsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchStaticIpsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IFetchStaticIpsRequest): google.cloud.datastream.v1.FetchStaticIpsRequest; - - /** - * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsRequest.verify|verify} messages. - * @param message FetchStaticIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsRequest.verify|verify} messages. - * @param message FetchStaticIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchStaticIpsRequest - * @throws {Error} If the payload is not 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.datastream.v1.FetchStaticIpsRequest; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchStaticIpsRequest - * @throws {Error} If the payload 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.datastream.v1.FetchStaticIpsRequest; - - /** - * Verifies a FetchStaticIpsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchStaticIpsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.FetchStaticIpsRequest; - - /** - * Creates a plain object from a FetchStaticIpsRequest message. Also converts values to other types if specified. - * @param message FetchStaticIpsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.FetchStaticIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchStaticIpsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchStaticIpsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchStaticIpsResponse. */ - interface IFetchStaticIpsResponse { - - /** FetchStaticIpsResponse staticIps */ - staticIps?: (string[]|null); - - /** FetchStaticIpsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a FetchStaticIpsResponse. */ - class FetchStaticIpsResponse implements IFetchStaticIpsResponse { - - /** - * Constructs a new FetchStaticIpsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IFetchStaticIpsResponse); - - /** FetchStaticIpsResponse staticIps. */ - public staticIps: string[]; - - /** FetchStaticIpsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new FetchStaticIpsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchStaticIpsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IFetchStaticIpsResponse): google.cloud.datastream.v1.FetchStaticIpsResponse; - - /** - * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsResponse.verify|verify} messages. - * @param message FetchStaticIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsResponse.verify|verify} messages. - * @param message FetchStaticIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchStaticIpsResponse - * @throws {Error} If the payload is not 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.datastream.v1.FetchStaticIpsResponse; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchStaticIpsResponse - * @throws {Error} If the payload 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.datastream.v1.FetchStaticIpsResponse; - - /** - * Verifies a FetchStaticIpsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchStaticIpsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.FetchStaticIpsResponse; - - /** - * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. - * @param message FetchStaticIpsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.FetchStaticIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchStaticIpsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchStaticIpsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectionProfilesRequest. */ - interface IListConnectionProfilesRequest { - - /** ListConnectionProfilesRequest parent */ - parent?: (string|null); - - /** ListConnectionProfilesRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectionProfilesRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectionProfilesRequest filter */ - filter?: (string|null); - - /** ListConnectionProfilesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectionProfilesRequest. */ - class ListConnectionProfilesRequest implements IListConnectionProfilesRequest { - - /** - * Constructs a new ListConnectionProfilesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListConnectionProfilesRequest); - - /** ListConnectionProfilesRequest parent. */ - public parent: string; - - /** ListConnectionProfilesRequest pageSize. */ - public pageSize: number; - - /** ListConnectionProfilesRequest pageToken. */ - public pageToken: string; - - /** ListConnectionProfilesRequest filter. */ - public filter: string; - - /** ListConnectionProfilesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectionProfilesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectionProfilesRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IListConnectionProfilesRequest): google.cloud.datastream.v1.ListConnectionProfilesRequest; - - /** - * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesRequest.verify|verify} messages. - * @param message ListConnectionProfilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListConnectionProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesRequest.verify|verify} messages. - * @param message ListConnectionProfilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListConnectionProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectionProfilesRequest - * @throws {Error} If the payload is not 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.datastream.v1.ListConnectionProfilesRequest; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectionProfilesRequest - * @throws {Error} If the payload 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.datastream.v1.ListConnectionProfilesRequest; - - /** - * Verifies a ListConnectionProfilesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectionProfilesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListConnectionProfilesRequest; - - /** - * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. - * @param message ListConnectionProfilesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListConnectionProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectionProfilesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectionProfilesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectionProfilesResponse. */ - interface IListConnectionProfilesResponse { - - /** ListConnectionProfilesResponse connectionProfiles */ - connectionProfiles?: (google.cloud.datastream.v1.IConnectionProfile[]|null); - - /** ListConnectionProfilesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectionProfilesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectionProfilesResponse. */ - class ListConnectionProfilesResponse implements IListConnectionProfilesResponse { - - /** - * Constructs a new ListConnectionProfilesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListConnectionProfilesResponse); - - /** ListConnectionProfilesResponse connectionProfiles. */ - public connectionProfiles: google.cloud.datastream.v1.IConnectionProfile[]; - - /** ListConnectionProfilesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectionProfilesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectionProfilesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectionProfilesResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IListConnectionProfilesResponse): google.cloud.datastream.v1.ListConnectionProfilesResponse; - - /** - * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesResponse.verify|verify} messages. - * @param message ListConnectionProfilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListConnectionProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesResponse.verify|verify} messages. - * @param message ListConnectionProfilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListConnectionProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectionProfilesResponse - * @throws {Error} If the payload is not 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.datastream.v1.ListConnectionProfilesResponse; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectionProfilesResponse - * @throws {Error} If the payload 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.datastream.v1.ListConnectionProfilesResponse; - - /** - * Verifies a ListConnectionProfilesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectionProfilesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListConnectionProfilesResponse; - - /** - * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. - * @param message ListConnectionProfilesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListConnectionProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectionProfilesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectionProfilesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectionProfileRequest. */ - interface IGetConnectionProfileRequest { - - /** GetConnectionProfileRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectionProfileRequest. */ - class GetConnectionProfileRequest implements IGetConnectionProfileRequest { - - /** - * Constructs a new GetConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGetConnectionProfileRequest); - - /** GetConnectionProfileRequest name. */ - public name: string; - - /** - * Creates a new GetConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IGetConnectionProfileRequest): google.cloud.datastream.v1.GetConnectionProfileRequest; - - /** - * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetConnectionProfileRequest.verify|verify} messages. - * @param message GetConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGetConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetConnectionProfileRequest.verify|verify} messages. - * @param message GetConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGetConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1.GetConnectionProfileRequest; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1.GetConnectionProfileRequest; - - /** - * Verifies a GetConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GetConnectionProfileRequest; - - /** - * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. - * @param message GetConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GetConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectionProfileRequest. */ - interface ICreateConnectionProfileRequest { - - /** CreateConnectionProfileRequest parent */ - parent?: (string|null); - - /** CreateConnectionProfileRequest connectionProfileId */ - connectionProfileId?: (string|null); - - /** CreateConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** CreateConnectionProfileRequest requestId */ - requestId?: (string|null); - - /** CreateConnectionProfileRequest validateOnly */ - validateOnly?: (boolean|null); - - /** CreateConnectionProfileRequest force */ - force?: (boolean|null); - } - - /** Represents a CreateConnectionProfileRequest. */ - class CreateConnectionProfileRequest implements ICreateConnectionProfileRequest { - - /** - * Constructs a new CreateConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ICreateConnectionProfileRequest); - - /** CreateConnectionProfileRequest parent. */ - public parent: string; - - /** CreateConnectionProfileRequest connectionProfileId. */ - public connectionProfileId: string; - - /** CreateConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** CreateConnectionProfileRequest requestId. */ - public requestId: string; - - /** CreateConnectionProfileRequest validateOnly. */ - public validateOnly: boolean; - - /** CreateConnectionProfileRequest force. */ - public force: boolean; - - /** - * Creates a new CreateConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.ICreateConnectionProfileRequest): google.cloud.datastream.v1.CreateConnectionProfileRequest; - - /** - * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateConnectionProfileRequest.verify|verify} messages. - * @param message CreateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ICreateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateConnectionProfileRequest.verify|verify} messages. - * @param message CreateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ICreateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1.CreateConnectionProfileRequest; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1.CreateConnectionProfileRequest; - - /** - * Verifies a CreateConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CreateConnectionProfileRequest; - - /** - * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. - * @param message CreateConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CreateConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectionProfileRequest. */ - interface IUpdateConnectionProfileRequest { - - /** UpdateConnectionProfileRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** UpdateConnectionProfileRequest requestId */ - requestId?: (string|null); - - /** UpdateConnectionProfileRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateConnectionProfileRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateConnectionProfileRequest. */ - class UpdateConnectionProfileRequest implements IUpdateConnectionProfileRequest { - - /** - * Constructs a new UpdateConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IUpdateConnectionProfileRequest); - - /** UpdateConnectionProfileRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1.IConnectionProfile|null); - - /** UpdateConnectionProfileRequest requestId. */ - public requestId: string; - - /** UpdateConnectionProfileRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateConnectionProfileRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IUpdateConnectionProfileRequest): google.cloud.datastream.v1.UpdateConnectionProfileRequest; - - /** - * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.UpdateConnectionProfileRequest.verify|verify} messages. - * @param message UpdateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IUpdateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.UpdateConnectionProfileRequest.verify|verify} messages. - * @param message UpdateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IUpdateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1.UpdateConnectionProfileRequest; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1.UpdateConnectionProfileRequest; - - /** - * Verifies an UpdateConnectionProfileRequest message. - * @param message Plain 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 UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.UpdateConnectionProfileRequest; - - /** - * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. - * @param message UpdateConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.UpdateConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectionProfileRequest. */ - interface IDeleteConnectionProfileRequest { - - /** DeleteConnectionProfileRequest name */ - name?: (string|null); - - /** DeleteConnectionProfileRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteConnectionProfileRequest. */ - class DeleteConnectionProfileRequest implements IDeleteConnectionProfileRequest { - - /** - * Constructs a new DeleteConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDeleteConnectionProfileRequest); - - /** DeleteConnectionProfileRequest name. */ - public name: string; - - /** DeleteConnectionProfileRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IDeleteConnectionProfileRequest): google.cloud.datastream.v1.DeleteConnectionProfileRequest; - - /** - * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteConnectionProfileRequest.verify|verify} messages. - * @param message DeleteConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDeleteConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteConnectionProfileRequest.verify|verify} messages. - * @param message DeleteConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDeleteConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1.DeleteConnectionProfileRequest; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1.DeleteConnectionProfileRequest; - - /** - * Verifies a DeleteConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DeleteConnectionProfileRequest; - - /** - * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. - * @param message DeleteConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DeleteConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamsRequest. */ - interface IListStreamsRequest { - - /** ListStreamsRequest parent */ - parent?: (string|null); - - /** ListStreamsRequest pageSize */ - pageSize?: (number|null); - - /** ListStreamsRequest pageToken */ - pageToken?: (string|null); - - /** ListStreamsRequest filter */ - filter?: (string|null); - - /** ListStreamsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListStreamsRequest. */ - class ListStreamsRequest implements IListStreamsRequest { - - /** - * Constructs a new ListStreamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListStreamsRequest); - - /** ListStreamsRequest parent. */ - public parent: string; - - /** ListStreamsRequest pageSize. */ - public pageSize: number; - - /** ListStreamsRequest pageToken. */ - public pageToken: string; - - /** ListStreamsRequest filter. */ - public filter: string; - - /** ListStreamsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListStreamsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IListStreamsRequest): google.cloud.datastream.v1.ListStreamsRequest; - - /** - * Encodes the specified ListStreamsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsRequest.verify|verify} messages. - * @param message ListStreamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsRequest.verify|verify} messages. - * @param message ListStreamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamsRequest - * @throws {Error} If the payload is not 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.datastream.v1.ListStreamsRequest; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamsRequest - * @throws {Error} If the payload 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.datastream.v1.ListStreamsRequest; - - /** - * Verifies a ListStreamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListStreamsRequest; - - /** - * Creates a plain object from a ListStreamsRequest message. Also converts values to other types if specified. - * @param message ListStreamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListStreamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamsResponse. */ - interface IListStreamsResponse { - - /** ListStreamsResponse streams */ - streams?: (google.cloud.datastream.v1.IStream[]|null); - - /** ListStreamsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListStreamsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListStreamsResponse. */ - class ListStreamsResponse implements IListStreamsResponse { - - /** - * Constructs a new ListStreamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListStreamsResponse); - - /** ListStreamsResponse streams. */ - public streams: google.cloud.datastream.v1.IStream[]; - - /** ListStreamsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListStreamsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListStreamsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IListStreamsResponse): google.cloud.datastream.v1.ListStreamsResponse; - - /** - * Encodes the specified ListStreamsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsResponse.verify|verify} messages. - * @param message ListStreamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsResponse.verify|verify} messages. - * @param message ListStreamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamsResponse - * @throws {Error} If the payload is not 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.datastream.v1.ListStreamsResponse; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamsResponse - * @throws {Error} If the payload 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.datastream.v1.ListStreamsResponse; - - /** - * Verifies a ListStreamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListStreamsResponse; - - /** - * Creates a plain object from a ListStreamsResponse message. Also converts values to other types if specified. - * @param message ListStreamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListStreamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetStreamRequest. */ - interface IGetStreamRequest { - - /** GetStreamRequest name */ - name?: (string|null); - } - - /** Represents a GetStreamRequest. */ - class GetStreamRequest implements IGetStreamRequest { - - /** - * Constructs a new GetStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGetStreamRequest); - - /** GetStreamRequest name. */ - public name: string; - - /** - * Creates a new GetStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IGetStreamRequest): google.cloud.datastream.v1.GetStreamRequest; - - /** - * Encodes the specified GetStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetStreamRequest.verify|verify} messages. - * @param message GetStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGetStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetStreamRequest.verify|verify} messages. - * @param message GetStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGetStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1.GetStreamRequest; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetStreamRequest - * @throws {Error} If the payload 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.datastream.v1.GetStreamRequest; - - /** - * Verifies a GetStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GetStreamRequest; - - /** - * Creates a plain object from a GetStreamRequest message. Also converts values to other types if specified. - * @param message GetStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GetStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateStreamRequest. */ - interface ICreateStreamRequest { - - /** CreateStreamRequest parent */ - parent?: (string|null); - - /** CreateStreamRequest streamId */ - streamId?: (string|null); - - /** CreateStreamRequest stream */ - stream?: (google.cloud.datastream.v1.IStream|null); - - /** CreateStreamRequest requestId */ - requestId?: (string|null); - - /** CreateStreamRequest validateOnly */ - validateOnly?: (boolean|null); - - /** CreateStreamRequest force */ - force?: (boolean|null); - } - - /** Represents a CreateStreamRequest. */ - class CreateStreamRequest implements ICreateStreamRequest { - - /** - * Constructs a new CreateStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ICreateStreamRequest); - - /** CreateStreamRequest parent. */ - public parent: string; - - /** CreateStreamRequest streamId. */ - public streamId: string; - - /** CreateStreamRequest stream. */ - public stream?: (google.cloud.datastream.v1.IStream|null); - - /** CreateStreamRequest requestId. */ - public requestId: string; - - /** CreateStreamRequest validateOnly. */ - public validateOnly: boolean; - - /** CreateStreamRequest force. */ - public force: boolean; - - /** - * Creates a new CreateStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.ICreateStreamRequest): google.cloud.datastream.v1.CreateStreamRequest; - - /** - * Encodes the specified CreateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateStreamRequest.verify|verify} messages. - * @param message CreateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ICreateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateStreamRequest.verify|verify} messages. - * @param message CreateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ICreateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1.CreateStreamRequest; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateStreamRequest - * @throws {Error} If the payload 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.datastream.v1.CreateStreamRequest; - - /** - * Verifies a CreateStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CreateStreamRequest; - - /** - * Creates a plain object from a CreateStreamRequest message. Also converts values to other types if specified. - * @param message CreateStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CreateStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateStreamRequest. */ - interface IUpdateStreamRequest { - - /** UpdateStreamRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStreamRequest stream */ - stream?: (google.cloud.datastream.v1.IStream|null); - - /** UpdateStreamRequest requestId */ - requestId?: (string|null); - - /** UpdateStreamRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateStreamRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateStreamRequest. */ - class UpdateStreamRequest implements IUpdateStreamRequest { - - /** - * Constructs a new UpdateStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IUpdateStreamRequest); - - /** UpdateStreamRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStreamRequest stream. */ - public stream?: (google.cloud.datastream.v1.IStream|null); - - /** UpdateStreamRequest requestId. */ - public requestId: string; - - /** UpdateStreamRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateStreamRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IUpdateStreamRequest): google.cloud.datastream.v1.UpdateStreamRequest; - - /** - * Encodes the specified UpdateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.UpdateStreamRequest.verify|verify} messages. - * @param message UpdateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IUpdateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.UpdateStreamRequest.verify|verify} messages. - * @param message UpdateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IUpdateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1.UpdateStreamRequest; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateStreamRequest - * @throws {Error} If the payload 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.datastream.v1.UpdateStreamRequest; - - /** - * Verifies an UpdateStreamRequest message. - * @param message Plain 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 UpdateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.UpdateStreamRequest; - - /** - * Creates a plain object from an UpdateStreamRequest message. Also converts values to other types if specified. - * @param message UpdateStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.UpdateStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteStreamRequest. */ - interface IDeleteStreamRequest { - - /** DeleteStreamRequest name */ - name?: (string|null); - - /** DeleteStreamRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteStreamRequest. */ - class DeleteStreamRequest implements IDeleteStreamRequest { - - /** - * Constructs a new DeleteStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDeleteStreamRequest); - - /** DeleteStreamRequest name. */ - public name: string; - - /** DeleteStreamRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IDeleteStreamRequest): google.cloud.datastream.v1.DeleteStreamRequest; - - /** - * Encodes the specified DeleteStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteStreamRequest.verify|verify} messages. - * @param message DeleteStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDeleteStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteStreamRequest.verify|verify} messages. - * @param message DeleteStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDeleteStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1.DeleteStreamRequest; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteStreamRequest - * @throws {Error} If the payload 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.datastream.v1.DeleteStreamRequest; - - /** - * Verifies a DeleteStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DeleteStreamRequest; - - /** - * Creates a plain object from a DeleteStreamRequest message. Also converts values to other types if specified. - * @param message DeleteStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DeleteStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunStreamRequest. */ - interface IRunStreamRequest { - - /** RunStreamRequest name */ - name?: (string|null); - - /** RunStreamRequest cdcStrategy */ - cdcStrategy?: (google.cloud.datastream.v1.ICdcStrategy|null); - - /** RunStreamRequest force */ - force?: (boolean|null); - } - - /** Represents a RunStreamRequest. */ - class RunStreamRequest implements IRunStreamRequest { - - /** - * Constructs a new RunStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IRunStreamRequest); - - /** RunStreamRequest name. */ - public name: string; - - /** RunStreamRequest cdcStrategy. */ - public cdcStrategy?: (google.cloud.datastream.v1.ICdcStrategy|null); - - /** RunStreamRequest force. */ - public force: boolean; - - /** - * Creates a new RunStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IRunStreamRequest): google.cloud.datastream.v1.RunStreamRequest; - - /** - * Encodes the specified RunStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. - * @param message RunStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IRunStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. - * @param message RunStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IRunStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1.RunStreamRequest; - - /** - * Decodes a RunStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunStreamRequest - * @throws {Error} If the payload 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.datastream.v1.RunStreamRequest; - - /** - * Verifies a RunStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.RunStreamRequest; - - /** - * Creates a plain object from a RunStreamRequest message. Also converts values to other types if specified. - * @param message RunStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.RunStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetStreamObjectRequest. */ - interface IGetStreamObjectRequest { - - /** GetStreamObjectRequest name */ - name?: (string|null); - } - - /** Represents a GetStreamObjectRequest. */ - class GetStreamObjectRequest implements IGetStreamObjectRequest { - - /** - * Constructs a new GetStreamObjectRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGetStreamObjectRequest); - - /** GetStreamObjectRequest name. */ - public name: string; - - /** - * Creates a new GetStreamObjectRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetStreamObjectRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IGetStreamObjectRequest): google.cloud.datastream.v1.GetStreamObjectRequest; - - /** - * Encodes the specified GetStreamObjectRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetStreamObjectRequest.verify|verify} messages. - * @param message GetStreamObjectRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGetStreamObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetStreamObjectRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetStreamObjectRequest.verify|verify} messages. - * @param message GetStreamObjectRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGetStreamObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetStreamObjectRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetStreamObjectRequest - * @throws {Error} If the payload is not 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.datastream.v1.GetStreamObjectRequest; - - /** - * Decodes a GetStreamObjectRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetStreamObjectRequest - * @throws {Error} If the payload 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.datastream.v1.GetStreamObjectRequest; - - /** - * Verifies a GetStreamObjectRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetStreamObjectRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetStreamObjectRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GetStreamObjectRequest; - - /** - * Creates a plain object from a GetStreamObjectRequest message. Also converts values to other types if specified. - * @param message GetStreamObjectRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GetStreamObjectRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetStreamObjectRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetStreamObjectRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LookupStreamObjectRequest. */ - interface ILookupStreamObjectRequest { - - /** LookupStreamObjectRequest parent */ - parent?: (string|null); - - /** LookupStreamObjectRequest sourceObjectIdentifier */ - sourceObjectIdentifier?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); - } - - /** Represents a LookupStreamObjectRequest. */ - class LookupStreamObjectRequest implements ILookupStreamObjectRequest { - - /** - * Constructs a new LookupStreamObjectRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ILookupStreamObjectRequest); - - /** LookupStreamObjectRequest parent. */ - public parent: string; - - /** LookupStreamObjectRequest sourceObjectIdentifier. */ - public sourceObjectIdentifier?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); - - /** - * Creates a new LookupStreamObjectRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LookupStreamObjectRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.ILookupStreamObjectRequest): google.cloud.datastream.v1.LookupStreamObjectRequest; - - /** - * Encodes the specified LookupStreamObjectRequest message. Does not implicitly {@link google.cloud.datastream.v1.LookupStreamObjectRequest.verify|verify} messages. - * @param message LookupStreamObjectRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ILookupStreamObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookupStreamObjectRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.LookupStreamObjectRequest.verify|verify} messages. - * @param message LookupStreamObjectRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ILookupStreamObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LookupStreamObjectRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LookupStreamObjectRequest - * @throws {Error} If the payload is not 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.datastream.v1.LookupStreamObjectRequest; - - /** - * Decodes a LookupStreamObjectRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LookupStreamObjectRequest - * @throws {Error} If the payload 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.datastream.v1.LookupStreamObjectRequest; - - /** - * Verifies a LookupStreamObjectRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LookupStreamObjectRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LookupStreamObjectRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.LookupStreamObjectRequest; - - /** - * Creates a plain object from a LookupStreamObjectRequest message. Also converts values to other types if specified. - * @param message LookupStreamObjectRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.LookupStreamObjectRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LookupStreamObjectRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LookupStreamObjectRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartBackfillJobRequest. */ - interface IStartBackfillJobRequest { - - /** StartBackfillJobRequest object */ - object?: (string|null); - } - - /** Represents a StartBackfillJobRequest. */ - class StartBackfillJobRequest implements IStartBackfillJobRequest { - - /** - * Constructs a new StartBackfillJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStartBackfillJobRequest); - - /** StartBackfillJobRequest object. */ - public object: string; - - /** - * Creates a new StartBackfillJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartBackfillJobRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IStartBackfillJobRequest): google.cloud.datastream.v1.StartBackfillJobRequest; - - /** - * Encodes the specified StartBackfillJobRequest message. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobRequest.verify|verify} messages. - * @param message StartBackfillJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStartBackfillJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartBackfillJobRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobRequest.verify|verify} messages. - * @param message StartBackfillJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStartBackfillJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartBackfillJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartBackfillJobRequest - * @throws {Error} If the payload is not 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.datastream.v1.StartBackfillJobRequest; - - /** - * Decodes a StartBackfillJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartBackfillJobRequest - * @throws {Error} If the payload 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.datastream.v1.StartBackfillJobRequest; - - /** - * Verifies a StartBackfillJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartBackfillJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartBackfillJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StartBackfillJobRequest; - - /** - * Creates a plain object from a StartBackfillJobRequest message. Also converts values to other types if specified. - * @param message StartBackfillJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StartBackfillJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartBackfillJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartBackfillJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartBackfillJobResponse. */ - interface IStartBackfillJobResponse { - - /** StartBackfillJobResponse object */ - object?: (google.cloud.datastream.v1.IStreamObject|null); - } - - /** Represents a StartBackfillJobResponse. */ - class StartBackfillJobResponse implements IStartBackfillJobResponse { - - /** - * Constructs a new StartBackfillJobResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStartBackfillJobResponse); - - /** StartBackfillJobResponse object. */ - public object?: (google.cloud.datastream.v1.IStreamObject|null); - - /** - * Creates a new StartBackfillJobResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartBackfillJobResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IStartBackfillJobResponse): google.cloud.datastream.v1.StartBackfillJobResponse; - - /** - * Encodes the specified StartBackfillJobResponse message. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobResponse.verify|verify} messages. - * @param message StartBackfillJobResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStartBackfillJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartBackfillJobResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobResponse.verify|verify} messages. - * @param message StartBackfillJobResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStartBackfillJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartBackfillJobResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartBackfillJobResponse - * @throws {Error} If the payload is not 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.datastream.v1.StartBackfillJobResponse; - - /** - * Decodes a StartBackfillJobResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartBackfillJobResponse - * @throws {Error} If the payload 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.datastream.v1.StartBackfillJobResponse; - - /** - * Verifies a StartBackfillJobResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartBackfillJobResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartBackfillJobResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StartBackfillJobResponse; - - /** - * Creates a plain object from a StartBackfillJobResponse message. Also converts values to other types if specified. - * @param message StartBackfillJobResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StartBackfillJobResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartBackfillJobResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartBackfillJobResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopBackfillJobRequest. */ - interface IStopBackfillJobRequest { - - /** StopBackfillJobRequest object */ - object?: (string|null); - } - - /** Represents a StopBackfillJobRequest. */ - class StopBackfillJobRequest implements IStopBackfillJobRequest { - - /** - * Constructs a new StopBackfillJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStopBackfillJobRequest); - - /** StopBackfillJobRequest object. */ - public object: string; - - /** - * Creates a new StopBackfillJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopBackfillJobRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IStopBackfillJobRequest): google.cloud.datastream.v1.StopBackfillJobRequest; - - /** - * Encodes the specified StopBackfillJobRequest message. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobRequest.verify|verify} messages. - * @param message StopBackfillJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStopBackfillJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopBackfillJobRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobRequest.verify|verify} messages. - * @param message StopBackfillJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStopBackfillJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopBackfillJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopBackfillJobRequest - * @throws {Error} If the payload is not 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.datastream.v1.StopBackfillJobRequest; - - /** - * Decodes a StopBackfillJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopBackfillJobRequest - * @throws {Error} If the payload 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.datastream.v1.StopBackfillJobRequest; - - /** - * Verifies a StopBackfillJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopBackfillJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopBackfillJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StopBackfillJobRequest; - - /** - * Creates a plain object from a StopBackfillJobRequest message. Also converts values to other types if specified. - * @param message StopBackfillJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StopBackfillJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopBackfillJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopBackfillJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopBackfillJobResponse. */ - interface IStopBackfillJobResponse { - - /** StopBackfillJobResponse object */ - object?: (google.cloud.datastream.v1.IStreamObject|null); - } - - /** Represents a StopBackfillJobResponse. */ - class StopBackfillJobResponse implements IStopBackfillJobResponse { - - /** - * Constructs a new StopBackfillJobResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStopBackfillJobResponse); - - /** StopBackfillJobResponse object. */ - public object?: (google.cloud.datastream.v1.IStreamObject|null); - - /** - * Creates a new StopBackfillJobResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopBackfillJobResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IStopBackfillJobResponse): google.cloud.datastream.v1.StopBackfillJobResponse; - - /** - * Encodes the specified StopBackfillJobResponse message. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobResponse.verify|verify} messages. - * @param message StopBackfillJobResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStopBackfillJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopBackfillJobResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobResponse.verify|verify} messages. - * @param message StopBackfillJobResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStopBackfillJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopBackfillJobResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopBackfillJobResponse - * @throws {Error} If the payload is not 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.datastream.v1.StopBackfillJobResponse; - - /** - * Decodes a StopBackfillJobResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopBackfillJobResponse - * @throws {Error} If the payload 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.datastream.v1.StopBackfillJobResponse; - - /** - * Verifies a StopBackfillJobResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopBackfillJobResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopBackfillJobResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StopBackfillJobResponse; - - /** - * Creates a plain object from a StopBackfillJobResponse message. Also converts values to other types if specified. - * @param message StopBackfillJobResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StopBackfillJobResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopBackfillJobResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopBackfillJobResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamObjectsRequest. */ - interface IListStreamObjectsRequest { - - /** ListStreamObjectsRequest parent */ - parent?: (string|null); - - /** ListStreamObjectsRequest pageSize */ - pageSize?: (number|null); - - /** ListStreamObjectsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListStreamObjectsRequest. */ - class ListStreamObjectsRequest implements IListStreamObjectsRequest { - - /** - * Constructs a new ListStreamObjectsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListStreamObjectsRequest); - - /** ListStreamObjectsRequest parent. */ - public parent: string; - - /** ListStreamObjectsRequest pageSize. */ - public pageSize: number; - - /** ListStreamObjectsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListStreamObjectsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamObjectsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IListStreamObjectsRequest): google.cloud.datastream.v1.ListStreamObjectsRequest; - - /** - * Encodes the specified ListStreamObjectsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsRequest.verify|verify} messages. - * @param message ListStreamObjectsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListStreamObjectsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamObjectsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsRequest.verify|verify} messages. - * @param message ListStreamObjectsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListStreamObjectsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamObjectsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamObjectsRequest - * @throws {Error} If the payload is not 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.datastream.v1.ListStreamObjectsRequest; - - /** - * Decodes a ListStreamObjectsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamObjectsRequest - * @throws {Error} If the payload 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.datastream.v1.ListStreamObjectsRequest; - - /** - * Verifies a ListStreamObjectsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamObjectsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamObjectsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListStreamObjectsRequest; - - /** - * Creates a plain object from a ListStreamObjectsRequest message. Also converts values to other types if specified. - * @param message ListStreamObjectsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListStreamObjectsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamObjectsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamObjectsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamObjectsResponse. */ - interface IListStreamObjectsResponse { - - /** ListStreamObjectsResponse streamObjects */ - streamObjects?: (google.cloud.datastream.v1.IStreamObject[]|null); - - /** ListStreamObjectsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListStreamObjectsResponse. */ - class ListStreamObjectsResponse implements IListStreamObjectsResponse { - - /** - * Constructs a new ListStreamObjectsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListStreamObjectsResponse); - - /** ListStreamObjectsResponse streamObjects. */ - public streamObjects: google.cloud.datastream.v1.IStreamObject[]; - - /** ListStreamObjectsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListStreamObjectsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamObjectsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IListStreamObjectsResponse): google.cloud.datastream.v1.ListStreamObjectsResponse; - - /** - * Encodes the specified ListStreamObjectsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsResponse.verify|verify} messages. - * @param message ListStreamObjectsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListStreamObjectsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamObjectsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsResponse.verify|verify} messages. - * @param message ListStreamObjectsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListStreamObjectsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamObjectsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamObjectsResponse - * @throws {Error} If the payload is not 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.datastream.v1.ListStreamObjectsResponse; - - /** - * Decodes a ListStreamObjectsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamObjectsResponse - * @throws {Error} If the payload 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.datastream.v1.ListStreamObjectsResponse; - - /** - * Verifies a ListStreamObjectsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamObjectsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamObjectsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListStreamObjectsResponse; - - /** - * Creates a plain object from a ListStreamObjectsResponse message. Also converts values to other types if specified. - * @param message ListStreamObjectsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListStreamObjectsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamObjectsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamObjectsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - - /** OperationMetadata validationResult */ - validationResult?: (google.cloud.datastream.v1.IValidationResult|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; - - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** OperationMetadata validationResult. */ - public validationResult?: (google.cloud.datastream.v1.IValidationResult|null); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.datastream.v1.IOperationMetadata): google.cloud.datastream.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.datastream.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @throws {Error} If the payload is not 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.datastream.v1.OperationMetadata; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @throws {Error} If the payload 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.datastream.v1.OperationMetadata; - - /** - * Verifies an OperationMetadata message. - * @param message Plain 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePrivateConnectionRequest. */ - interface ICreatePrivateConnectionRequest { - - /** CreatePrivateConnectionRequest parent */ - parent?: (string|null); - - /** CreatePrivateConnectionRequest privateConnectionId */ - privateConnectionId?: (string|null); - - /** CreatePrivateConnectionRequest privateConnection */ - privateConnection?: (google.cloud.datastream.v1.IPrivateConnection|null); - - /** CreatePrivateConnectionRequest requestId */ - requestId?: (string|null); - - /** CreatePrivateConnectionRequest force */ - force?: (boolean|null); - } - - /** Represents a CreatePrivateConnectionRequest. */ - class CreatePrivateConnectionRequest implements ICreatePrivateConnectionRequest { - - /** - * Constructs a new CreatePrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ICreatePrivateConnectionRequest); - - /** CreatePrivateConnectionRequest parent. */ - public parent: string; - - /** CreatePrivateConnectionRequest privateConnectionId. */ - public privateConnectionId: string; - - /** CreatePrivateConnectionRequest privateConnection. */ - public privateConnection?: (google.cloud.datastream.v1.IPrivateConnection|null); - - /** CreatePrivateConnectionRequest requestId. */ - public requestId: string; - - /** CreatePrivateConnectionRequest force. */ - public force: boolean; - - /** - * Creates a new CreatePrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.ICreatePrivateConnectionRequest): google.cloud.datastream.v1.CreatePrivateConnectionRequest; - - /** - * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreatePrivateConnectionRequest.verify|verify} messages. - * @param message CreatePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreatePrivateConnectionRequest.verify|verify} messages. - * @param message CreatePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1.CreatePrivateConnectionRequest; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1.CreatePrivateConnectionRequest; - - /** - * Verifies a CreatePrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CreatePrivateConnectionRequest; - - /** - * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. - * @param message CreatePrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CreatePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPrivateConnectionsRequest. */ - interface IListPrivateConnectionsRequest { - - /** ListPrivateConnectionsRequest parent */ - parent?: (string|null); - - /** ListPrivateConnectionsRequest pageSize */ - pageSize?: (number|null); - - /** ListPrivateConnectionsRequest pageToken */ - pageToken?: (string|null); - - /** ListPrivateConnectionsRequest filter */ - filter?: (string|null); - - /** ListPrivateConnectionsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListPrivateConnectionsRequest. */ - class ListPrivateConnectionsRequest implements IListPrivateConnectionsRequest { - - /** - * Constructs a new ListPrivateConnectionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListPrivateConnectionsRequest); - - /** ListPrivateConnectionsRequest parent. */ - public parent: string; - - /** ListPrivateConnectionsRequest pageSize. */ - public pageSize: number; - - /** ListPrivateConnectionsRequest pageToken. */ - public pageToken: string; - - /** ListPrivateConnectionsRequest filter. */ - public filter: string; - - /** ListPrivateConnectionsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListPrivateConnectionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPrivateConnectionsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IListPrivateConnectionsRequest): google.cloud.datastream.v1.ListPrivateConnectionsRequest; - - /** - * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsRequest.verify|verify} messages. - * @param message ListPrivateConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsRequest.verify|verify} messages. - * @param message ListPrivateConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPrivateConnectionsRequest - * @throws {Error} If the payload is not 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.datastream.v1.ListPrivateConnectionsRequest; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPrivateConnectionsRequest - * @throws {Error} If the payload 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.datastream.v1.ListPrivateConnectionsRequest; - - /** - * Verifies a ListPrivateConnectionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPrivateConnectionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListPrivateConnectionsRequest; - - /** - * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. - * @param message ListPrivateConnectionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListPrivateConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPrivateConnectionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPrivateConnectionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPrivateConnectionsResponse. */ - interface IListPrivateConnectionsResponse { - - /** ListPrivateConnectionsResponse privateConnections */ - privateConnections?: (google.cloud.datastream.v1.IPrivateConnection[]|null); - - /** ListPrivateConnectionsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListPrivateConnectionsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListPrivateConnectionsResponse. */ - class ListPrivateConnectionsResponse implements IListPrivateConnectionsResponse { - - /** - * Constructs a new ListPrivateConnectionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListPrivateConnectionsResponse); - - /** ListPrivateConnectionsResponse privateConnections. */ - public privateConnections: google.cloud.datastream.v1.IPrivateConnection[]; - - /** ListPrivateConnectionsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListPrivateConnectionsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListPrivateConnectionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPrivateConnectionsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IListPrivateConnectionsResponse): google.cloud.datastream.v1.ListPrivateConnectionsResponse; - - /** - * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsResponse.verify|verify} messages. - * @param message ListPrivateConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsResponse.verify|verify} messages. - * @param message ListPrivateConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPrivateConnectionsResponse - * @throws {Error} If the payload is not 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.datastream.v1.ListPrivateConnectionsResponse; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPrivateConnectionsResponse - * @throws {Error} If the payload 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.datastream.v1.ListPrivateConnectionsResponse; - - /** - * Verifies a ListPrivateConnectionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPrivateConnectionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListPrivateConnectionsResponse; - - /** - * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. - * @param message ListPrivateConnectionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListPrivateConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPrivateConnectionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPrivateConnectionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePrivateConnectionRequest. */ - interface IDeletePrivateConnectionRequest { - - /** DeletePrivateConnectionRequest name */ - name?: (string|null); - - /** DeletePrivateConnectionRequest requestId */ - requestId?: (string|null); - - /** DeletePrivateConnectionRequest force */ - force?: (boolean|null); - } - - /** Represents a DeletePrivateConnectionRequest. */ - class DeletePrivateConnectionRequest implements IDeletePrivateConnectionRequest { - - /** - * Constructs a new DeletePrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDeletePrivateConnectionRequest); - - /** DeletePrivateConnectionRequest name. */ - public name: string; - - /** DeletePrivateConnectionRequest requestId. */ - public requestId: string; - - /** DeletePrivateConnectionRequest force. */ - public force: boolean; - - /** - * Creates a new DeletePrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IDeletePrivateConnectionRequest): google.cloud.datastream.v1.DeletePrivateConnectionRequest; - - /** - * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeletePrivateConnectionRequest.verify|verify} messages. - * @param message DeletePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeletePrivateConnectionRequest.verify|verify} messages. - * @param message DeletePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1.DeletePrivateConnectionRequest; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1.DeletePrivateConnectionRequest; - - /** - * Verifies a DeletePrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DeletePrivateConnectionRequest; - - /** - * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. - * @param message DeletePrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DeletePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPrivateConnectionRequest. */ - interface IGetPrivateConnectionRequest { - - /** GetPrivateConnectionRequest name */ - name?: (string|null); - } - - /** Represents a GetPrivateConnectionRequest. */ - class GetPrivateConnectionRequest implements IGetPrivateConnectionRequest { - - /** - * Constructs a new GetPrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGetPrivateConnectionRequest); - - /** GetPrivateConnectionRequest name. */ - public name: string; - - /** - * Creates a new GetPrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IGetPrivateConnectionRequest): google.cloud.datastream.v1.GetPrivateConnectionRequest; - - /** - * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetPrivateConnectionRequest.verify|verify} messages. - * @param message GetPrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetPrivateConnectionRequest.verify|verify} messages. - * @param message GetPrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1.GetPrivateConnectionRequest; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1.GetPrivateConnectionRequest; - - /** - * Verifies a GetPrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GetPrivateConnectionRequest; - - /** - * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. - * @param message GetPrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GetPrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateRouteRequest. */ - interface ICreateRouteRequest { - - /** CreateRouteRequest parent */ - parent?: (string|null); - - /** CreateRouteRequest routeId */ - routeId?: (string|null); - - /** CreateRouteRequest route */ - route?: (google.cloud.datastream.v1.IRoute|null); - - /** CreateRouteRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateRouteRequest. */ - class CreateRouteRequest implements ICreateRouteRequest { - - /** - * Constructs a new CreateRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ICreateRouteRequest); - - /** CreateRouteRequest parent. */ - public parent: string; - - /** CreateRouteRequest routeId. */ - public routeId: string; - - /** CreateRouteRequest route. */ - public route?: (google.cloud.datastream.v1.IRoute|null); - - /** CreateRouteRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.ICreateRouteRequest): google.cloud.datastream.v1.CreateRouteRequest; - - /** - * Encodes the specified CreateRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateRouteRequest.verify|verify} messages. - * @param message CreateRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ICreateRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateRouteRequest.verify|verify} messages. - * @param message CreateRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ICreateRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1.CreateRouteRequest; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateRouteRequest - * @throws {Error} If the payload 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.datastream.v1.CreateRouteRequest; - - /** - * Verifies a CreateRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CreateRouteRequest; - - /** - * Creates a plain object from a CreateRouteRequest message. Also converts values to other types if specified. - * @param message CreateRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CreateRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRoutesRequest. */ - interface IListRoutesRequest { - - /** ListRoutesRequest parent */ - parent?: (string|null); - - /** ListRoutesRequest pageSize */ - pageSize?: (number|null); - - /** ListRoutesRequest pageToken */ - pageToken?: (string|null); - - /** ListRoutesRequest filter */ - filter?: (string|null); - - /** ListRoutesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListRoutesRequest. */ - class ListRoutesRequest implements IListRoutesRequest { - - /** - * Constructs a new ListRoutesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListRoutesRequest); - - /** ListRoutesRequest parent. */ - public parent: string; - - /** ListRoutesRequest pageSize. */ - public pageSize: number; - - /** ListRoutesRequest pageToken. */ - public pageToken: string; - - /** ListRoutesRequest filter. */ - public filter: string; - - /** ListRoutesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListRoutesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRoutesRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IListRoutesRequest): google.cloud.datastream.v1.ListRoutesRequest; - - /** - * Encodes the specified ListRoutesRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesRequest.verify|verify} messages. - * @param message ListRoutesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListRoutesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRoutesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesRequest.verify|verify} messages. - * @param message ListRoutesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListRoutesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRoutesRequest - * @throws {Error} If the payload is not 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.datastream.v1.ListRoutesRequest; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRoutesRequest - * @throws {Error} If the payload 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.datastream.v1.ListRoutesRequest; - - /** - * Verifies a ListRoutesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRoutesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRoutesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListRoutesRequest; - - /** - * Creates a plain object from a ListRoutesRequest message. Also converts values to other types if specified. - * @param message ListRoutesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListRoutesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRoutesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRoutesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRoutesResponse. */ - interface IListRoutesResponse { - - /** ListRoutesResponse routes */ - routes?: (google.cloud.datastream.v1.IRoute[]|null); - - /** ListRoutesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListRoutesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListRoutesResponse. */ - class ListRoutesResponse implements IListRoutesResponse { - - /** - * Constructs a new ListRoutesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IListRoutesResponse); - - /** ListRoutesResponse routes. */ - public routes: google.cloud.datastream.v1.IRoute[]; - - /** ListRoutesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListRoutesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListRoutesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRoutesResponse instance - */ - public static create(properties?: google.cloud.datastream.v1.IListRoutesResponse): google.cloud.datastream.v1.ListRoutesResponse; - - /** - * Encodes the specified ListRoutesResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesResponse.verify|verify} messages. - * @param message ListRoutesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IListRoutesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRoutesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesResponse.verify|verify} messages. - * @param message ListRoutesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IListRoutesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRoutesResponse - * @throws {Error} If the payload is not 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.datastream.v1.ListRoutesResponse; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRoutesResponse - * @throws {Error} If the payload 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.datastream.v1.ListRoutesResponse; - - /** - * Verifies a ListRoutesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRoutesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRoutesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ListRoutesResponse; - - /** - * Creates a plain object from a ListRoutesResponse message. Also converts values to other types if specified. - * @param message ListRoutesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ListRoutesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRoutesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRoutesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteRouteRequest. */ - interface IDeleteRouteRequest { - - /** DeleteRouteRequest name */ - name?: (string|null); - - /** DeleteRouteRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteRouteRequest. */ - class DeleteRouteRequest implements IDeleteRouteRequest { - - /** - * Constructs a new DeleteRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDeleteRouteRequest); - - /** DeleteRouteRequest name. */ - public name: string; - - /** DeleteRouteRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IDeleteRouteRequest): google.cloud.datastream.v1.DeleteRouteRequest; - - /** - * Encodes the specified DeleteRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteRouteRequest.verify|verify} messages. - * @param message DeleteRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDeleteRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteRouteRequest.verify|verify} messages. - * @param message DeleteRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDeleteRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1.DeleteRouteRequest; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteRouteRequest - * @throws {Error} If the payload 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.datastream.v1.DeleteRouteRequest; - - /** - * Verifies a DeleteRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DeleteRouteRequest; - - /** - * Creates a plain object from a DeleteRouteRequest message. Also converts values to other types if specified. - * @param message DeleteRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DeleteRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRouteRequest. */ - interface IGetRouteRequest { - - /** GetRouteRequest name */ - name?: (string|null); - } - - /** Represents a GetRouteRequest. */ - class GetRouteRequest implements IGetRouteRequest { - - /** - * Constructs a new GetRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGetRouteRequest); - - /** GetRouteRequest name. */ - public name: string; - - /** - * Creates a new GetRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1.IGetRouteRequest): google.cloud.datastream.v1.GetRouteRequest; - - /** - * Encodes the specified GetRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetRouteRequest.verify|verify} messages. - * @param message GetRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGetRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetRouteRequest.verify|verify} messages. - * @param message GetRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGetRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1.GetRouteRequest; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRouteRequest - * @throws {Error} If the payload 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.datastream.v1.GetRouteRequest; - - /** - * Verifies a GetRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GetRouteRequest; - - /** - * Creates a plain object from a GetRouteRequest message. Also converts values to other types if specified. - * @param message GetRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GetRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleProfile. */ - interface IOracleProfile { - - /** OracleProfile hostname */ - hostname?: (string|null); - - /** OracleProfile port */ - port?: (number|null); - - /** OracleProfile username */ - username?: (string|null); - - /** OracleProfile password */ - password?: (string|null); - - /** OracleProfile databaseService */ - databaseService?: (string|null); - - /** OracleProfile connectionAttributes */ - connectionAttributes?: ({ [k: string]: string }|null); - - /** OracleProfile oracleSslConfig */ - oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); - - /** OracleProfile oracleAsmConfig */ - oracleAsmConfig?: (google.cloud.datastream.v1.IOracleAsmConfig|null); - - /** OracleProfile secretManagerStoredPassword */ - secretManagerStoredPassword?: (string|null); - } - - /** Represents an OracleProfile. */ - class OracleProfile implements IOracleProfile { - - /** - * Constructs a new OracleProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleProfile); - - /** OracleProfile hostname. */ - public hostname: string; - - /** OracleProfile port. */ - public port: number; - - /** OracleProfile username. */ - public username: string; - - /** OracleProfile password. */ - public password: string; - - /** OracleProfile databaseService. */ - public databaseService: string; - - /** OracleProfile connectionAttributes. */ - public connectionAttributes: { [k: string]: string }; - - /** OracleProfile oracleSslConfig. */ - public oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); - - /** OracleProfile oracleAsmConfig. */ - public oracleAsmConfig?: (google.cloud.datastream.v1.IOracleAsmConfig|null); - - /** OracleProfile secretManagerStoredPassword. */ - public secretManagerStoredPassword: string; - - /** - * Creates a new OracleProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleProfile): google.cloud.datastream.v1.OracleProfile; - - /** - * Encodes the specified OracleProfile message. Does not implicitly {@link google.cloud.datastream.v1.OracleProfile.verify|verify} messages. - * @param message OracleProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleProfile.verify|verify} messages. - * @param message OracleProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleProfile - * @throws {Error} If the payload is not 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.datastream.v1.OracleProfile; - - /** - * Decodes an OracleProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleProfile - * @throws {Error} If the payload 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.datastream.v1.OracleProfile; - - /** - * Verifies an OracleProfile message. - * @param message Plain 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 OracleProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleProfile; - - /** - * Creates a plain object from an OracleProfile message. Also converts values to other types if specified. - * @param message OracleProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleAsmConfig. */ - interface IOracleAsmConfig { - - /** OracleAsmConfig hostname */ - hostname?: (string|null); - - /** OracleAsmConfig port */ - port?: (number|null); - - /** OracleAsmConfig username */ - username?: (string|null); - - /** OracleAsmConfig password */ - password?: (string|null); - - /** OracleAsmConfig asmService */ - asmService?: (string|null); - - /** OracleAsmConfig connectionAttributes */ - connectionAttributes?: ({ [k: string]: string }|null); - - /** OracleAsmConfig oracleSslConfig */ - oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); - } - - /** Represents an OracleAsmConfig. */ - class OracleAsmConfig implements IOracleAsmConfig { - - /** - * Constructs a new OracleAsmConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleAsmConfig); - - /** OracleAsmConfig hostname. */ - public hostname: string; - - /** OracleAsmConfig port. */ - public port: number; - - /** OracleAsmConfig username. */ - public username: string; - - /** OracleAsmConfig password. */ - public password: string; - - /** OracleAsmConfig asmService. */ - public asmService: string; - - /** OracleAsmConfig connectionAttributes. */ - public connectionAttributes: { [k: string]: string }; - - /** OracleAsmConfig oracleSslConfig. */ - public oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); - - /** - * Creates a new OracleAsmConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleAsmConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleAsmConfig): google.cloud.datastream.v1.OracleAsmConfig; - - /** - * Encodes the specified OracleAsmConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. - * @param message OracleAsmConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleAsmConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleAsmConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. - * @param message OracleAsmConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleAsmConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleAsmConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleAsmConfig - * @throws {Error} If the payload is not 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.datastream.v1.OracleAsmConfig; - - /** - * Decodes an OracleAsmConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleAsmConfig - * @throws {Error} If the payload 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.datastream.v1.OracleAsmConfig; - - /** - * Verifies an OracleAsmConfig message. - * @param message Plain 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 OracleAsmConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleAsmConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleAsmConfig; - - /** - * Creates a plain object from an OracleAsmConfig message. Also converts values to other types if specified. - * @param message OracleAsmConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleAsmConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleAsmConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleAsmConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlProfile. */ - interface IMysqlProfile { - - /** MysqlProfile hostname */ - hostname?: (string|null); - - /** MysqlProfile port */ - port?: (number|null); - - /** MysqlProfile username */ - username?: (string|null); - - /** MysqlProfile password */ - password?: (string|null); - - /** MysqlProfile sslConfig */ - sslConfig?: (google.cloud.datastream.v1.IMysqlSslConfig|null); - } - - /** Represents a MysqlProfile. */ - class MysqlProfile implements IMysqlProfile { - - /** - * Constructs a new MysqlProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlProfile); - - /** MysqlProfile hostname. */ - public hostname: string; - - /** MysqlProfile port. */ - public port: number; - - /** MysqlProfile username. */ - public username: string; - - /** MysqlProfile password. */ - public password: string; - - /** MysqlProfile sslConfig. */ - public sslConfig?: (google.cloud.datastream.v1.IMysqlSslConfig|null); - - /** - * Creates a new MysqlProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlProfile): google.cloud.datastream.v1.MysqlProfile; - - /** - * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. - * @param message MysqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. - * @param message MysqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlProfile - * @throws {Error} If the payload is not 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.datastream.v1.MysqlProfile; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlProfile - * @throws {Error} If the payload 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.datastream.v1.MysqlProfile; - - /** - * Verifies a MysqlProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlProfile; - - /** - * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. - * @param message MysqlProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlProfile. */ - interface IPostgresqlProfile { - - /** PostgresqlProfile hostname */ - hostname?: (string|null); - - /** PostgresqlProfile port */ - port?: (number|null); - - /** PostgresqlProfile username */ - username?: (string|null); - - /** PostgresqlProfile password */ - password?: (string|null); - - /** PostgresqlProfile database */ - database?: (string|null); - - /** PostgresqlProfile sslConfig */ - sslConfig?: (google.cloud.datastream.v1.IPostgresqlSslConfig|null); - } - - /** Represents a PostgresqlProfile. */ - class PostgresqlProfile implements IPostgresqlProfile { - - /** - * Constructs a new PostgresqlProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlProfile); - - /** PostgresqlProfile hostname. */ - public hostname: string; - - /** PostgresqlProfile port. */ - public port: number; - - /** PostgresqlProfile username. */ - public username: string; - - /** PostgresqlProfile password. */ - public password: string; - - /** PostgresqlProfile database. */ - public database: string; - - /** PostgresqlProfile sslConfig. */ - public sslConfig?: (google.cloud.datastream.v1.IPostgresqlSslConfig|null); - - /** - * Creates a new PostgresqlProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlProfile): google.cloud.datastream.v1.PostgresqlProfile; - - /** - * Encodes the specified PostgresqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. - * @param message PostgresqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. - * @param message PostgresqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlProfile - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlProfile; - - /** - * Decodes a PostgresqlProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlProfile - * @throws {Error} If the payload 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.datastream.v1.PostgresqlProfile; - - /** - * Verifies a PostgresqlProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlProfile; - - /** - * Creates a plain object from a PostgresqlProfile message. Also converts values to other types if specified. - * @param message PostgresqlProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerProfile. */ - interface ISqlServerProfile { - - /** SqlServerProfile hostname */ - hostname?: (string|null); - - /** SqlServerProfile port */ - port?: (number|null); - - /** SqlServerProfile username */ - username?: (string|null); - - /** SqlServerProfile password */ - password?: (string|null); - - /** SqlServerProfile database */ - database?: (string|null); - } - - /** Represents a SqlServerProfile. */ - class SqlServerProfile implements ISqlServerProfile { - - /** - * Constructs a new SqlServerProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerProfile); - - /** SqlServerProfile hostname. */ - public hostname: string; - - /** SqlServerProfile port. */ - public port: number; - - /** SqlServerProfile username. */ - public username: string; - - /** SqlServerProfile password. */ - public password: string; - - /** SqlServerProfile database. */ - public database: string; - - /** - * Creates a new SqlServerProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerProfile): google.cloud.datastream.v1.SqlServerProfile; - - /** - * Encodes the specified SqlServerProfile message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. - * @param message SqlServerProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. - * @param message SqlServerProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerProfile - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerProfile; - - /** - * Decodes a SqlServerProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerProfile - * @throws {Error} If the payload 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.datastream.v1.SqlServerProfile; - - /** - * Verifies a SqlServerProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerProfile; - - /** - * Creates a plain object from a SqlServerProfile message. Also converts values to other types if specified. - * @param message SqlServerProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsProfile. */ - interface IGcsProfile { - - /** GcsProfile bucket */ - bucket?: (string|null); - - /** GcsProfile rootPath */ - rootPath?: (string|null); - } - - /** Represents a GcsProfile. */ - class GcsProfile implements IGcsProfile { - - /** - * Constructs a new GcsProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGcsProfile); - - /** GcsProfile bucket. */ - public bucket: string; - - /** GcsProfile rootPath. */ - public rootPath: string; - - /** - * Creates a new GcsProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IGcsProfile): google.cloud.datastream.v1.GcsProfile; - - /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsProfile - * @throws {Error} If the payload is not 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.datastream.v1.GcsProfile; - - /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsProfile - * @throws {Error} If the payload 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.datastream.v1.GcsProfile; - - /** - * Verifies a GcsProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsProfile; - - /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. - * @param message GcsProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GcsProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BigQueryProfile. */ - interface IBigQueryProfile { - } - - /** Represents a BigQueryProfile. */ - class BigQueryProfile implements IBigQueryProfile { - - /** - * Constructs a new BigQueryProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IBigQueryProfile); - - /** - * Creates a new BigQueryProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IBigQueryProfile): google.cloud.datastream.v1.BigQueryProfile; - - /** - * Encodes the specified BigQueryProfile message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. - * @param message BigQueryProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IBigQueryProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. - * @param message BigQueryProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IBigQueryProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryProfile - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryProfile; - - /** - * Decodes a BigQueryProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryProfile - * @throws {Error} If the payload 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.datastream.v1.BigQueryProfile; - - /** - * Verifies a BigQueryProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryProfile; - - /** - * Creates a plain object from a BigQueryProfile message. Also converts values to other types if specified. - * @param message BigQueryProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StaticServiceIpConnectivity. */ - interface IStaticServiceIpConnectivity { - } - - /** Represents a StaticServiceIpConnectivity. */ - class StaticServiceIpConnectivity implements IStaticServiceIpConnectivity { - - /** - * Constructs a new StaticServiceIpConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStaticServiceIpConnectivity); - - /** - * Creates a new StaticServiceIpConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns StaticServiceIpConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1.IStaticServiceIpConnectivity): google.cloud.datastream.v1.StaticServiceIpConnectivity; - - /** - * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. - * @param message StaticServiceIpConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. - * @param message StaticServiceIpConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StaticServiceIpConnectivity - * @throws {Error} If the payload is not 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.datastream.v1.StaticServiceIpConnectivity; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StaticServiceIpConnectivity - * @throws {Error} If the payload 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.datastream.v1.StaticServiceIpConnectivity; - - /** - * Verifies a StaticServiceIpConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StaticServiceIpConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StaticServiceIpConnectivity; - - /** - * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. - * @param message StaticServiceIpConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StaticServiceIpConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StaticServiceIpConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StaticServiceIpConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ForwardSshTunnelConnectivity. */ - interface IForwardSshTunnelConnectivity { - - /** ForwardSshTunnelConnectivity hostname */ - hostname?: (string|null); - - /** ForwardSshTunnelConnectivity username */ - username?: (string|null); - - /** ForwardSshTunnelConnectivity port */ - port?: (number|null); - - /** ForwardSshTunnelConnectivity password */ - password?: (string|null); - - /** ForwardSshTunnelConnectivity privateKey */ - privateKey?: (string|null); - } - - /** Represents a ForwardSshTunnelConnectivity. */ - class ForwardSshTunnelConnectivity implements IForwardSshTunnelConnectivity { - - /** - * Constructs a new ForwardSshTunnelConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IForwardSshTunnelConnectivity); - - /** ForwardSshTunnelConnectivity hostname. */ - public hostname: string; - - /** ForwardSshTunnelConnectivity username. */ - public username: string; - - /** ForwardSshTunnelConnectivity port. */ - public port: number; - - /** ForwardSshTunnelConnectivity password. */ - public password?: (string|null); - - /** ForwardSshTunnelConnectivity privateKey. */ - public privateKey?: (string|null); - - /** ForwardSshTunnelConnectivity authenticationMethod. */ - public authenticationMethod?: ("password"|"privateKey"); - - /** - * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardSshTunnelConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1.IForwardSshTunnelConnectivity): google.cloud.datastream.v1.ForwardSshTunnelConnectivity; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @param message ForwardSshTunnelConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @param message ForwardSshTunnelConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not 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.datastream.v1.ForwardSshTunnelConnectivity; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardSshTunnelConnectivity - * @throws {Error} If the payload 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.datastream.v1.ForwardSshTunnelConnectivity; - - /** - * Verifies a ForwardSshTunnelConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardSshTunnelConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ForwardSshTunnelConnectivity; - - /** - * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. - * @param message ForwardSshTunnelConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ForwardSshTunnelConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardSshTunnelConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardSshTunnelConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcPeeringConfig. */ - interface IVpcPeeringConfig { - - /** VpcPeeringConfig vpc */ - vpc?: (string|null); - - /** VpcPeeringConfig subnet */ - subnet?: (string|null); - } - - /** Represents a VpcPeeringConfig. */ - class VpcPeeringConfig implements IVpcPeeringConfig { - - /** - * Constructs a new VpcPeeringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IVpcPeeringConfig); - - /** VpcPeeringConfig vpc. */ - public vpc: string; - - /** VpcPeeringConfig subnet. */ - public subnet: string; - - /** - * Creates a new VpcPeeringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcPeeringConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IVpcPeeringConfig): google.cloud.datastream.v1.VpcPeeringConfig; - - /** - * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. - * @param message VpcPeeringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. - * @param message VpcPeeringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcPeeringConfig - * @throws {Error} If the payload is not 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.datastream.v1.VpcPeeringConfig; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcPeeringConfig - * @throws {Error} If the payload 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.datastream.v1.VpcPeeringConfig; - - /** - * Verifies a VpcPeeringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcPeeringConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.VpcPeeringConfig; - - /** - * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. - * @param message VpcPeeringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.VpcPeeringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcPeeringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcPeeringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateConnection. */ - interface IPrivateConnection { - - /** PrivateConnection name */ - name?: (string|null); - - /** PrivateConnection createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection labels */ - labels?: ({ [k: string]: string }|null); - - /** PrivateConnection displayName */ - displayName?: (string|null); - - /** PrivateConnection state */ - state?: (google.cloud.datastream.v1.PrivateConnection.State|keyof typeof google.cloud.datastream.v1.PrivateConnection.State|null); - - /** PrivateConnection error */ - error?: (google.cloud.datastream.v1.IError|null); - - /** PrivateConnection vpcPeeringConfig */ - vpcPeeringConfig?: (google.cloud.datastream.v1.IVpcPeeringConfig|null); - } - - /** Represents a PrivateConnection. */ - class PrivateConnection implements IPrivateConnection { - - /** - * Constructs a new PrivateConnection. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPrivateConnection); - - /** PrivateConnection name. */ - public name: string; - - /** PrivateConnection createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection labels. */ - public labels: { [k: string]: string }; - - /** PrivateConnection displayName. */ - public displayName: string; - - /** PrivateConnection state. */ - public state: (google.cloud.datastream.v1.PrivateConnection.State|keyof typeof google.cloud.datastream.v1.PrivateConnection.State); - - /** PrivateConnection error. */ - public error?: (google.cloud.datastream.v1.IError|null); - - /** PrivateConnection vpcPeeringConfig. */ - public vpcPeeringConfig?: (google.cloud.datastream.v1.IVpcPeeringConfig|null); - - /** - * Creates a new PrivateConnection instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnection instance - */ - public static create(properties?: google.cloud.datastream.v1.IPrivateConnection): google.cloud.datastream.v1.PrivateConnection; - - /** - * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. - * @param message PrivateConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. - * @param message PrivateConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnection - * @throws {Error} If the payload is not 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.datastream.v1.PrivateConnection; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnection - * @throws {Error} If the payload 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.datastream.v1.PrivateConnection; - - /** - * Verifies a PrivateConnection message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnection - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PrivateConnection; - - /** - * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. - * @param message PrivateConnection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PrivateConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PrivateConnection { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - CREATED = 2, - FAILED = 3, - DELETING = 4, - FAILED_TO_DELETE = 5 - } - } - - /** Properties of a PrivateConnectivity. */ - interface IPrivateConnectivity { - - /** PrivateConnectivity privateConnection */ - privateConnection?: (string|null); - } - - /** Represents a PrivateConnectivity. */ - class PrivateConnectivity implements IPrivateConnectivity { - - /** - * Constructs a new PrivateConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPrivateConnectivity); - - /** PrivateConnectivity privateConnection. */ - public privateConnection: string; - - /** - * Creates a new PrivateConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1.IPrivateConnectivity): google.cloud.datastream.v1.PrivateConnectivity; - - /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnectivity - * @throws {Error} If the payload is not 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.datastream.v1.PrivateConnectivity; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnectivity - * @throws {Error} If the payload 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.datastream.v1.PrivateConnectivity; - - /** - * Verifies a PrivateConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PrivateConnectivity; - - /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. - * @param message PrivateConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PrivateConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Route. */ - interface IRoute { - - /** Route name */ - name?: (string|null); - - /** Route createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Route updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Route labels */ - labels?: ({ [k: string]: string }|null); - - /** Route displayName */ - displayName?: (string|null); - - /** Route destinationAddress */ - destinationAddress?: (string|null); - - /** Route destinationPort */ - destinationPort?: (number|null); - } - - /** Represents a Route. */ - class Route implements IRoute { - - /** - * Constructs a new Route. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IRoute); - - /** Route name. */ - public name: string; - - /** Route createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Route updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Route labels. */ - public labels: { [k: string]: string }; - - /** Route displayName. */ - public displayName: string; - - /** Route destinationAddress. */ - public destinationAddress: string; - - /** Route destinationPort. */ - public destinationPort: number; - - /** - * Creates a new Route instance using the specified properties. - * @param [properties] Properties to set - * @returns Route instance - */ - public static create(properties?: google.cloud.datastream.v1.IRoute): google.cloud.datastream.v1.Route; - - /** - * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. - * @param message Route message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. - * @param message Route message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Route message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Route - * @throws {Error} If the payload is not 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.datastream.v1.Route; - - /** - * Decodes a Route message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Route - * @throws {Error} If the payload 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.datastream.v1.Route; - - /** - * Verifies a Route message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Route message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Route - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Route; - - /** - * Creates a plain object from a Route message. Also converts values to other types if specified. - * @param message Route - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Route, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Route to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Route - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlSslConfig. */ - interface IMysqlSslConfig { - - /** MysqlSslConfig clientKey */ - clientKey?: (string|null); - - /** MysqlSslConfig clientKeySet */ - clientKeySet?: (boolean|null); - - /** MysqlSslConfig clientCertificate */ - clientCertificate?: (string|null); - - /** MysqlSslConfig clientCertificateSet */ - clientCertificateSet?: (boolean|null); - - /** MysqlSslConfig caCertificate */ - caCertificate?: (string|null); - - /** MysqlSslConfig caCertificateSet */ - caCertificateSet?: (boolean|null); - } - - /** Represents a MysqlSslConfig. */ - class MysqlSslConfig implements IMysqlSslConfig { - - /** - * Constructs a new MysqlSslConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlSslConfig); - - /** MysqlSslConfig clientKey. */ - public clientKey: string; - - /** MysqlSslConfig clientKeySet. */ - public clientKeySet: boolean; - - /** MysqlSslConfig clientCertificate. */ - public clientCertificate: string; - - /** MysqlSslConfig clientCertificateSet. */ - public clientCertificateSet: boolean; - - /** MysqlSslConfig caCertificate. */ - public caCertificate: string; - - /** MysqlSslConfig caCertificateSet. */ - public caCertificateSet: boolean; - - /** - * Creates a new MysqlSslConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlSslConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlSslConfig): google.cloud.datastream.v1.MysqlSslConfig; - - /** - * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. - * @param message MysqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. - * @param message MysqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlSslConfig - * @throws {Error} If the payload is not 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.datastream.v1.MysqlSslConfig; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlSslConfig - * @throws {Error} If the payload 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.datastream.v1.MysqlSslConfig; - - /** - * Verifies a MysqlSslConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlSslConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSslConfig; - - /** - * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. - * @param message MysqlSslConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlSslConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlSslConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleSslConfig. */ - interface IOracleSslConfig { - - /** OracleSslConfig caCertificate */ - caCertificate?: (string|null); - - /** OracleSslConfig caCertificateSet */ - caCertificateSet?: (boolean|null); - } - - /** Represents an OracleSslConfig. */ - class OracleSslConfig implements IOracleSslConfig { - - /** - * Constructs a new OracleSslConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleSslConfig); - - /** OracleSslConfig caCertificate. */ - public caCertificate: string; - - /** OracleSslConfig caCertificateSet. */ - public caCertificateSet: boolean; - - /** - * Creates a new OracleSslConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleSslConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleSslConfig): google.cloud.datastream.v1.OracleSslConfig; - - /** - * Encodes the specified OracleSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. - * @param message OracleSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. - * @param message OracleSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleSslConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleSslConfig - * @throws {Error} If the payload is not 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.datastream.v1.OracleSslConfig; - - /** - * Decodes an OracleSslConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleSslConfig - * @throws {Error} If the payload 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.datastream.v1.OracleSslConfig; - - /** - * Verifies an OracleSslConfig message. - * @param message Plain 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 OracleSslConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleSslConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSslConfig; - - /** - * Creates a plain object from an OracleSslConfig message. Also converts values to other types if specified. - * @param message OracleSslConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleSslConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleSslConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlSslConfig. */ - interface IPostgresqlSslConfig { - - /** PostgresqlSslConfig serverVerification */ - serverVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null); - - /** PostgresqlSslConfig serverAndClientVerification */ - serverAndClientVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null); - } - - /** Represents a PostgresqlSslConfig. */ - class PostgresqlSslConfig implements IPostgresqlSslConfig { - - /** - * Constructs a new PostgresqlSslConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlSslConfig); - - /** PostgresqlSslConfig serverVerification. */ - public serverVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null); - - /** PostgresqlSslConfig serverAndClientVerification. */ - public serverAndClientVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null); - - /** PostgresqlSslConfig encryptionSetting. */ - public encryptionSetting?: ("serverVerification"|"serverAndClientVerification"); - - /** - * Creates a new PostgresqlSslConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlSslConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlSslConfig): google.cloud.datastream.v1.PostgresqlSslConfig; - - /** - * Encodes the specified PostgresqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. - * @param message PostgresqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. - * @param message PostgresqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlSslConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlSslConfig - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig; - - /** - * Decodes a PostgresqlSslConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlSslConfig - * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig; - - /** - * Verifies a PostgresqlSslConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlSslConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig; - - /** - * Creates a plain object from a PostgresqlSslConfig message. Also converts values to other types if specified. - * @param message PostgresqlSslConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlSslConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlSslConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostgresqlSslConfig { - - /** Properties of a ServerVerification. */ - interface IServerVerification { - - /** ServerVerification caCertificate */ - caCertificate?: (string|null); - } - - /** Represents a ServerVerification. */ - class ServerVerification implements IServerVerification { - - /** - * Constructs a new ServerVerification. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification); - - /** ServerVerification caCertificate. */ - public caCertificate: string; - - /** - * Creates a new ServerVerification instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerVerification instance - */ - public static create(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification): google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification; - - /** - * Encodes the specified ServerVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. - * @param message ServerVerification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. - * @param message ServerVerification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerVerification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerVerification - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig.ServerVerification; - - /** - * Decodes a ServerVerification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerVerification - * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig.ServerVerification; - - /** - * Verifies a ServerVerification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerVerification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerVerification - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification; - - /** - * Creates a plain object from a ServerVerification message. Also converts values to other types if specified. - * @param message ServerVerification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerVerification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerVerification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerAndClientVerification. */ - interface IServerAndClientVerification { - - /** ServerAndClientVerification clientCertificate */ - clientCertificate?: (string|null); - - /** ServerAndClientVerification clientKey */ - clientKey?: (string|null); - - /** ServerAndClientVerification caCertificate */ - caCertificate?: (string|null); - } - - /** Represents a ServerAndClientVerification. */ - class ServerAndClientVerification implements IServerAndClientVerification { - - /** - * Constructs a new ServerAndClientVerification. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification); - - /** ServerAndClientVerification clientCertificate. */ - public clientCertificate: string; - - /** ServerAndClientVerification clientKey. */ - public clientKey: string; - - /** ServerAndClientVerification caCertificate. */ - public caCertificate: string; - - /** - * Creates a new ServerAndClientVerification instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerAndClientVerification instance - */ - public static create(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification): google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; - - /** - * Encodes the specified ServerAndClientVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. - * @param message ServerAndClientVerification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerAndClientVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. - * @param message ServerAndClientVerification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerAndClientVerification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerAndClientVerification - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; - - /** - * Decodes a ServerAndClientVerification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerAndClientVerification - * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; - - /** - * Verifies a ServerAndClientVerification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerAndClientVerification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerAndClientVerification - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; - - /** - * Creates a plain object from a ServerAndClientVerification message. Also converts values to other types if specified. - * @param message ServerAndClientVerification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerAndClientVerification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerAndClientVerification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ConnectionProfile. */ - interface IConnectionProfile { - - /** ConnectionProfile name */ - name?: (string|null); - - /** ConnectionProfile createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectionProfile displayName */ - displayName?: (string|null); - - /** ConnectionProfile oracleProfile */ - oracleProfile?: (google.cloud.datastream.v1.IOracleProfile|null); - - /** ConnectionProfile gcsProfile */ - gcsProfile?: (google.cloud.datastream.v1.IGcsProfile|null); - - /** ConnectionProfile mysqlProfile */ - mysqlProfile?: (google.cloud.datastream.v1.IMysqlProfile|null); - - /** ConnectionProfile bigqueryProfile */ - bigqueryProfile?: (google.cloud.datastream.v1.IBigQueryProfile|null); - - /** ConnectionProfile postgresqlProfile */ - postgresqlProfile?: (google.cloud.datastream.v1.IPostgresqlProfile|null); - - /** ConnectionProfile sqlServerProfile */ - sqlServerProfile?: (google.cloud.datastream.v1.ISqlServerProfile|null); - - /** ConnectionProfile staticServiceIpConnectivity */ - staticServiceIpConnectivity?: (google.cloud.datastream.v1.IStaticServiceIpConnectivity|null); - - /** ConnectionProfile forwardSshConnectivity */ - forwardSshConnectivity?: (google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null); - - /** ConnectionProfile privateConnectivity */ - privateConnectivity?: (google.cloud.datastream.v1.IPrivateConnectivity|null); - } - - /** Represents a ConnectionProfile. */ - class ConnectionProfile implements IConnectionProfile { - - /** - * Constructs a new ConnectionProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IConnectionProfile); - - /** ConnectionProfile name. */ - public name: string; - - /** ConnectionProfile createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile labels. */ - public labels: { [k: string]: string }; - - /** ConnectionProfile displayName. */ - public displayName: string; - - /** ConnectionProfile oracleProfile. */ - public oracleProfile?: (google.cloud.datastream.v1.IOracleProfile|null); - - /** ConnectionProfile gcsProfile. */ - public gcsProfile?: (google.cloud.datastream.v1.IGcsProfile|null); - - /** ConnectionProfile mysqlProfile. */ - public mysqlProfile?: (google.cloud.datastream.v1.IMysqlProfile|null); - - /** ConnectionProfile bigqueryProfile. */ - public bigqueryProfile?: (google.cloud.datastream.v1.IBigQueryProfile|null); - - /** ConnectionProfile postgresqlProfile. */ - public postgresqlProfile?: (google.cloud.datastream.v1.IPostgresqlProfile|null); - - /** ConnectionProfile sqlServerProfile. */ - public sqlServerProfile?: (google.cloud.datastream.v1.ISqlServerProfile|null); - - /** ConnectionProfile staticServiceIpConnectivity. */ - public staticServiceIpConnectivity?: (google.cloud.datastream.v1.IStaticServiceIpConnectivity|null); - - /** ConnectionProfile forwardSshConnectivity. */ - public forwardSshConnectivity?: (google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null); - - /** ConnectionProfile privateConnectivity. */ - public privateConnectivity?: (google.cloud.datastream.v1.IPrivateConnectivity|null); - - /** ConnectionProfile profile. */ - public profile?: ("oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"|"sqlServerProfile"); - - /** ConnectionProfile connectivity. */ - public connectivity?: ("staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"); - - /** - * Creates a new ConnectionProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectionProfile instance - */ - public static create(properties?: google.cloud.datastream.v1.IConnectionProfile): google.cloud.datastream.v1.ConnectionProfile; - - /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectionProfile - * @throws {Error} If the payload is not 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.datastream.v1.ConnectionProfile; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionProfile - * @throws {Error} If the payload 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.datastream.v1.ConnectionProfile; - - /** - * Verifies a ConnectionProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ConnectionProfile; - - /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. - * @param message ConnectionProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectionProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleColumn. */ - interface IOracleColumn { - - /** OracleColumn column */ - column?: (string|null); - - /** OracleColumn dataType */ - dataType?: (string|null); - - /** OracleColumn length */ - length?: (number|null); - - /** OracleColumn precision */ - precision?: (number|null); - - /** OracleColumn scale */ - scale?: (number|null); - - /** OracleColumn encoding */ - encoding?: (string|null); - - /** OracleColumn primaryKey */ - primaryKey?: (boolean|null); - - /** OracleColumn nullable */ - nullable?: (boolean|null); - - /** OracleColumn ordinalPosition */ - ordinalPosition?: (number|null); - } - - /** Represents an OracleColumn. */ - class OracleColumn implements IOracleColumn { - - /** - * Constructs a new OracleColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleColumn); - - /** OracleColumn column. */ - public column: string; - - /** OracleColumn dataType. */ - public dataType: string; - - /** OracleColumn length. */ - public length: number; - - /** OracleColumn precision. */ - public precision: number; - - /** OracleColumn scale. */ - public scale: number; - - /** OracleColumn encoding. */ - public encoding: string; - - /** OracleColumn primaryKey. */ - public primaryKey: boolean; - - /** OracleColumn nullable. */ - public nullable: boolean; - - /** OracleColumn ordinalPosition. */ - public ordinalPosition: number; - - /** - * Creates a new OracleColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleColumn instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleColumn): google.cloud.datastream.v1.OracleColumn; - - /** - * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. - * @param message OracleColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. - * @param message OracleColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleColumn - * @throws {Error} If the payload is not 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.datastream.v1.OracleColumn; - - /** - * Decodes an OracleColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleColumn - * @throws {Error} If the payload 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.datastream.v1.OracleColumn; - - /** - * Verifies an OracleColumn message. - * @param message Plain 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 OracleColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleColumn; - - /** - * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. - * @param message OracleColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleTable. */ - interface IOracleTable { - - /** OracleTable table */ - table?: (string|null); - - /** OracleTable oracleColumns */ - oracleColumns?: (google.cloud.datastream.v1.IOracleColumn[]|null); - } - - /** Represents an OracleTable. */ - class OracleTable implements IOracleTable { - - /** - * Constructs a new OracleTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleTable); - - /** OracleTable table. */ - public table: string; - - /** OracleTable oracleColumns. */ - public oracleColumns: google.cloud.datastream.v1.IOracleColumn[]; - - /** - * Creates a new OracleTable instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleTable instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleTable): google.cloud.datastream.v1.OracleTable; - - /** - * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. - * @param message OracleTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. - * @param message OracleTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleTable - * @throws {Error} If the payload is not 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.datastream.v1.OracleTable; - - /** - * Decodes an OracleTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleTable - * @throws {Error} If the payload 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.datastream.v1.OracleTable; - - /** - * Verifies an OracleTable message. - * @param message Plain 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 OracleTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleTable; - - /** - * Creates a plain object from an OracleTable message. Also converts values to other types if specified. - * @param message OracleTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleSchema. */ - interface IOracleSchema { - - /** OracleSchema schema */ - schema?: (string|null); - - /** OracleSchema oracleTables */ - oracleTables?: (google.cloud.datastream.v1.IOracleTable[]|null); - } - - /** Represents an OracleSchema. */ - class OracleSchema implements IOracleSchema { - - /** - * Constructs a new OracleSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleSchema); - - /** OracleSchema schema. */ - public schema: string; - - /** OracleSchema oracleTables. */ - public oracleTables: google.cloud.datastream.v1.IOracleTable[]; - - /** - * Creates a new OracleSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleSchema instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleSchema): google.cloud.datastream.v1.OracleSchema; - - /** - * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. - * @param message OracleSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. - * @param message OracleSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleSchema - * @throws {Error} If the payload is not 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.datastream.v1.OracleSchema; - - /** - * Decodes an OracleSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleSchema - * @throws {Error} If the payload 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.datastream.v1.OracleSchema; - - /** - * Verifies an OracleSchema message. - * @param message Plain 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 OracleSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSchema; - - /** - * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. - * @param message OracleSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleRdbms. */ - interface IOracleRdbms { - - /** OracleRdbms oracleSchemas */ - oracleSchemas?: (google.cloud.datastream.v1.IOracleSchema[]|null); - } - - /** Represents an OracleRdbms. */ - class OracleRdbms implements IOracleRdbms { - - /** - * Constructs a new OracleRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleRdbms); - - /** OracleRdbms oracleSchemas. */ - public oracleSchemas: google.cloud.datastream.v1.IOracleSchema[]; - - /** - * Creates a new OracleRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleRdbms): google.cloud.datastream.v1.OracleRdbms; - - /** - * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. - * @param message OracleRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. - * @param message OracleRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleRdbms - * @throws {Error} If the payload is not 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.datastream.v1.OracleRdbms; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleRdbms - * @throws {Error} If the payload 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.datastream.v1.OracleRdbms; - - /** - * Verifies an OracleRdbms message. - * @param message Plain 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 OracleRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleRdbms; - - /** - * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. - * @param message OracleRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleSourceConfig. */ - interface IOracleSourceConfig { - - /** OracleSourceConfig includeObjects */ - includeObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** OracleSourceConfig excludeObjects */ - excludeObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** OracleSourceConfig maxConcurrentCdcTasks */ - maxConcurrentCdcTasks?: (number|null); - - /** OracleSourceConfig maxConcurrentBackfillTasks */ - maxConcurrentBackfillTasks?: (number|null); - - /** OracleSourceConfig dropLargeObjects */ - dropLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null); - - /** OracleSourceConfig streamLargeObjects */ - streamLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null); - - /** OracleSourceConfig logMiner */ - logMiner?: (google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null); - - /** OracleSourceConfig binaryLogParser */ - binaryLogParser?: (google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null); - } - - /** Represents an OracleSourceConfig. */ - class OracleSourceConfig implements IOracleSourceConfig { - - /** - * Constructs a new OracleSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleSourceConfig); - - /** OracleSourceConfig includeObjects. */ - public includeObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** OracleSourceConfig excludeObjects. */ - public excludeObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** OracleSourceConfig maxConcurrentCdcTasks. */ - public maxConcurrentCdcTasks: number; - - /** OracleSourceConfig maxConcurrentBackfillTasks. */ - public maxConcurrentBackfillTasks: number; - - /** OracleSourceConfig dropLargeObjects. */ - public dropLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null); - - /** OracleSourceConfig streamLargeObjects. */ - public streamLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null); - - /** OracleSourceConfig logMiner. */ - public logMiner?: (google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null); - - /** OracleSourceConfig binaryLogParser. */ - public binaryLogParser?: (google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null); - - /** OracleSourceConfig largeObjectsHandling. */ - public largeObjectsHandling?: ("dropLargeObjects"|"streamLargeObjects"); - - /** OracleSourceConfig cdcMethod. */ - public cdcMethod?: ("logMiner"|"binaryLogParser"); - - /** - * Creates a new OracleSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleSourceConfig): google.cloud.datastream.v1.OracleSourceConfig; - - /** - * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. - * @param message OracleSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. - * @param message OracleSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleSourceConfig - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig; - - /** - * Verifies an OracleSourceConfig message. - * @param message Plain 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 OracleSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig; - - /** - * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. - * @param message OracleSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OracleSourceConfig { - - /** Properties of a DropLargeObjects. */ - interface IDropLargeObjects { - } - - /** Represents a DropLargeObjects. */ - class DropLargeObjects implements IDropLargeObjects { - - /** - * Constructs a new DropLargeObjects. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects); - - /** - * Creates a new DropLargeObjects instance using the specified properties. - * @param [properties] Properties to set - * @returns DropLargeObjects instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects): google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects; - - /** - * Encodes the specified DropLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @param message DropLargeObjects message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DropLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @param message DropLargeObjects message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DropLargeObjects message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DropLargeObjects - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.DropLargeObjects; - - /** - * Decodes a DropLargeObjects message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DropLargeObjects - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.DropLargeObjects; - - /** - * Verifies a DropLargeObjects message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DropLargeObjects message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DropLargeObjects - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects; - - /** - * Creates a plain object from a DropLargeObjects message. Also converts values to other types if specified. - * @param message DropLargeObjects - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DropLargeObjects to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DropLargeObjects - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StreamLargeObjects. */ - interface IStreamLargeObjects { - } - - /** Represents a StreamLargeObjects. */ - class StreamLargeObjects implements IStreamLargeObjects { - - /** - * Constructs a new StreamLargeObjects. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects); - - /** - * Creates a new StreamLargeObjects instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamLargeObjects instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects): google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects; - - /** - * Encodes the specified StreamLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @param message StreamLargeObjects message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @param message StreamLargeObjects message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamLargeObjects - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.StreamLargeObjects; - - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamLargeObjects - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.StreamLargeObjects; - - /** - * Verifies a StreamLargeObjects message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamLargeObjects message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamLargeObjects - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects; - - /** - * Creates a plain object from a StreamLargeObjects message. Also converts values to other types if specified. - * @param message StreamLargeObjects - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamLargeObjects to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StreamLargeObjects - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LogMiner. */ - interface ILogMiner { - } - - /** Represents a LogMiner. */ - class LogMiner implements ILogMiner { - - /** - * Constructs a new LogMiner. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner); - - /** - * Creates a new LogMiner instance using the specified properties. - * @param [properties] Properties to set - * @returns LogMiner instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner): google.cloud.datastream.v1.OracleSourceConfig.LogMiner; - - /** - * Encodes the specified LogMiner message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. - * @param message LogMiner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogMiner message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. - * @param message LogMiner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogMiner message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogMiner - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.LogMiner; - - /** - * Decodes a LogMiner message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogMiner - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.LogMiner; - - /** - * Verifies a LogMiner message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogMiner message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogMiner - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.LogMiner; - - /** - * Creates a plain object from a LogMiner message. Also converts values to other types if specified. - * @param message LogMiner - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.LogMiner, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogMiner to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LogMiner - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BinaryLogParser. */ - interface IBinaryLogParser { - - /** BinaryLogParser oracleAsmLogFileAccess */ - oracleAsmLogFileAccess?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null); - - /** BinaryLogParser logFileDirectories */ - logFileDirectories?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null); - } - - /** Represents a BinaryLogParser. */ - class BinaryLogParser implements IBinaryLogParser { - - /** - * Constructs a new BinaryLogParser. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser); - - /** BinaryLogParser oracleAsmLogFileAccess. */ - public oracleAsmLogFileAccess?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null); - - /** BinaryLogParser logFileDirectories. */ - public logFileDirectories?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null); - - /** BinaryLogParser logFileAccess. */ - public logFileAccess?: ("oracleAsmLogFileAccess"|"logFileDirectories"); - - /** - * Creates a new BinaryLogParser instance using the specified properties. - * @param [properties] Properties to set - * @returns BinaryLogParser instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser; - - /** - * Encodes the specified BinaryLogParser message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. - * @param message BinaryLogParser message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinaryLogParser message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. - * @param message BinaryLogParser message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinaryLogParser message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinaryLogParser - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.BinaryLogParser; - - /** - * Decodes a BinaryLogParser message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinaryLogParser - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.BinaryLogParser; - - /** - * Verifies a BinaryLogParser message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinaryLogParser message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinaryLogParser - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser; - - /** - * Creates a plain object from a BinaryLogParser message. Also converts values to other types if specified. - * @param message BinaryLogParser - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinaryLogParser to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BinaryLogParser - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BinaryLogParser { - - /** Properties of an OracleAsmLogFileAccess. */ - interface IOracleAsmLogFileAccess { - } - - /** Represents an OracleAsmLogFileAccess. */ - class OracleAsmLogFileAccess implements IOracleAsmLogFileAccess { - - /** - * Constructs a new OracleAsmLogFileAccess. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess); - - /** - * Creates a new OracleAsmLogFileAccess instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleAsmLogFileAccess instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; - - /** - * Encodes the specified OracleAsmLogFileAccess message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. - * @param message OracleAsmLogFileAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleAsmLogFileAccess message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. - * @param message OracleAsmLogFileAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleAsmLogFileAccess - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; - - /** - * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleAsmLogFileAccess - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; - - /** - * Verifies an OracleAsmLogFileAccess message. - * @param message Plain 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 OracleAsmLogFileAccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleAsmLogFileAccess - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; - - /** - * Creates a plain object from an OracleAsmLogFileAccess message. Also converts values to other types if specified. - * @param message OracleAsmLogFileAccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleAsmLogFileAccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleAsmLogFileAccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LogFileDirectories. */ - interface ILogFileDirectories { - - /** LogFileDirectories onlineLogDirectory */ - onlineLogDirectory?: (string|null); - - /** LogFileDirectories archivedLogDirectory */ - archivedLogDirectory?: (string|null); - } - - /** Represents a LogFileDirectories. */ - class LogFileDirectories implements ILogFileDirectories { - - /** - * Constructs a new LogFileDirectories. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories); - - /** LogFileDirectories onlineLogDirectory. */ - public onlineLogDirectory: string; - - /** LogFileDirectories archivedLogDirectory. */ - public archivedLogDirectory: string; - - /** - * Creates a new LogFileDirectories instance using the specified properties. - * @param [properties] Properties to set - * @returns LogFileDirectories instance - */ - public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; - - /** - * Encodes the specified LogFileDirectories message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. - * @param message LogFileDirectories message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogFileDirectories message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. - * @param message LogFileDirectories message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogFileDirectories message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogFileDirectories - * @throws {Error} If the payload is not 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.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; - - /** - * Decodes a LogFileDirectories message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogFileDirectories - * @throws {Error} If the payload 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.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; - - /** - * Verifies a LogFileDirectories message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogFileDirectories message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogFileDirectories - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; - - /** - * Creates a plain object from a LogFileDirectories message. Also converts values to other types if specified. - * @param message LogFileDirectories - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogFileDirectories to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LogFileDirectories - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a PostgresqlColumn. */ - interface IPostgresqlColumn { - - /** PostgresqlColumn column */ - column?: (string|null); - - /** PostgresqlColumn dataType */ - dataType?: (string|null); - - /** PostgresqlColumn length */ - length?: (number|null); - - /** PostgresqlColumn precision */ - precision?: (number|null); - - /** PostgresqlColumn scale */ - scale?: (number|null); - - /** PostgresqlColumn primaryKey */ - primaryKey?: (boolean|null); - - /** PostgresqlColumn nullable */ - nullable?: (boolean|null); - - /** PostgresqlColumn ordinalPosition */ - ordinalPosition?: (number|null); - } - - /** Represents a PostgresqlColumn. */ - class PostgresqlColumn implements IPostgresqlColumn { - - /** - * Constructs a new PostgresqlColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlColumn); - - /** PostgresqlColumn column. */ - public column: string; - - /** PostgresqlColumn dataType. */ - public dataType: string; - - /** PostgresqlColumn length. */ - public length: number; - - /** PostgresqlColumn precision. */ - public precision: number; - - /** PostgresqlColumn scale. */ - public scale: number; - - /** PostgresqlColumn primaryKey. */ - public primaryKey: boolean; - - /** PostgresqlColumn nullable. */ - public nullable: boolean; - - /** PostgresqlColumn ordinalPosition. */ - public ordinalPosition: number; - - /** - * Creates a new PostgresqlColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlColumn instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlColumn): google.cloud.datastream.v1.PostgresqlColumn; - - /** - * Encodes the specified PostgresqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. - * @param message PostgresqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. - * @param message PostgresqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlColumn - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlColumn; - - /** - * Decodes a PostgresqlColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlColumn - * @throws {Error} If the payload 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.datastream.v1.PostgresqlColumn; - - /** - * Verifies a PostgresqlColumn message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlColumn; - - /** - * Creates a plain object from a PostgresqlColumn message. Also converts values to other types if specified. - * @param message PostgresqlColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlTable. */ - interface IPostgresqlTable { - - /** PostgresqlTable table */ - table?: (string|null); - - /** PostgresqlTable postgresqlColumns */ - postgresqlColumns?: (google.cloud.datastream.v1.IPostgresqlColumn[]|null); - } - - /** Represents a PostgresqlTable. */ - class PostgresqlTable implements IPostgresqlTable { - - /** - * Constructs a new PostgresqlTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlTable); - - /** PostgresqlTable table. */ - public table: string; - - /** PostgresqlTable postgresqlColumns. */ - public postgresqlColumns: google.cloud.datastream.v1.IPostgresqlColumn[]; - - /** - * Creates a new PostgresqlTable instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlTable instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlTable): google.cloud.datastream.v1.PostgresqlTable; - - /** - * Encodes the specified PostgresqlTable message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @param message PostgresqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @param message PostgresqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlTable - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlTable; - - /** - * Decodes a PostgresqlTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlTable - * @throws {Error} If the payload 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.datastream.v1.PostgresqlTable; - - /** - * Verifies a PostgresqlTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlTable; - - /** - * Creates a plain object from a PostgresqlTable message. Also converts values to other types if specified. - * @param message PostgresqlTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlSchema. */ - interface IPostgresqlSchema { - - /** PostgresqlSchema schema */ - schema?: (string|null); - - /** PostgresqlSchema postgresqlTables */ - postgresqlTables?: (google.cloud.datastream.v1.IPostgresqlTable[]|null); - } - - /** Represents a PostgresqlSchema. */ - class PostgresqlSchema implements IPostgresqlSchema { - - /** - * Constructs a new PostgresqlSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlSchema); - - /** PostgresqlSchema schema. */ - public schema: string; - - /** PostgresqlSchema postgresqlTables. */ - public postgresqlTables: google.cloud.datastream.v1.IPostgresqlTable[]; - - /** - * Creates a new PostgresqlSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlSchema instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlSchema): google.cloud.datastream.v1.PostgresqlSchema; - - /** - * Encodes the specified PostgresqlSchema message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @param message PostgresqlSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @param message PostgresqlSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlSchema - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSchema; - - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlSchema - * @throws {Error} If the payload 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.datastream.v1.PostgresqlSchema; - - /** - * Verifies a PostgresqlSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSchema; - - /** - * Creates a plain object from a PostgresqlSchema message. Also converts values to other types if specified. - * @param message PostgresqlSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlRdbms. */ - interface IPostgresqlRdbms { - - /** PostgresqlRdbms postgresqlSchemas */ - postgresqlSchemas?: (google.cloud.datastream.v1.IPostgresqlSchema[]|null); - } - - /** Represents a PostgresqlRdbms. */ - class PostgresqlRdbms implements IPostgresqlRdbms { - - /** - * Constructs a new PostgresqlRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlRdbms); - - /** PostgresqlRdbms postgresqlSchemas. */ - public postgresqlSchemas: google.cloud.datastream.v1.IPostgresqlSchema[]; - - /** - * Creates a new PostgresqlRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlRdbms): google.cloud.datastream.v1.PostgresqlRdbms; - - /** - * Encodes the specified PostgresqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @param message PostgresqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @param message PostgresqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlRdbms - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlRdbms; - - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlRdbms - * @throws {Error} If the payload 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.datastream.v1.PostgresqlRdbms; - - /** - * Verifies a PostgresqlRdbms message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlRdbms; - - /** - * Creates a plain object from a PostgresqlRdbms message. Also converts values to other types if specified. - * @param message PostgresqlRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlSourceConfig. */ - interface IPostgresqlSourceConfig { - - /** PostgresqlSourceConfig includeObjects */ - includeObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** PostgresqlSourceConfig excludeObjects */ - excludeObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** PostgresqlSourceConfig replicationSlot */ - replicationSlot?: (string|null); - - /** PostgresqlSourceConfig publication */ - publication?: (string|null); - - /** PostgresqlSourceConfig maxConcurrentBackfillTasks */ - maxConcurrentBackfillTasks?: (number|null); - } - - /** Represents a PostgresqlSourceConfig. */ - class PostgresqlSourceConfig implements IPostgresqlSourceConfig { - - /** - * Constructs a new PostgresqlSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlSourceConfig); - - /** PostgresqlSourceConfig includeObjects. */ - public includeObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** PostgresqlSourceConfig excludeObjects. */ - public excludeObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** PostgresqlSourceConfig replicationSlot. */ - public replicationSlot: string; - - /** PostgresqlSourceConfig publication. */ - public publication: string; - - /** PostgresqlSourceConfig maxConcurrentBackfillTasks. */ - public maxConcurrentBackfillTasks: number; - - /** - * Creates a new PostgresqlSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IPostgresqlSourceConfig): google.cloud.datastream.v1.PostgresqlSourceConfig; - - /** - * Encodes the specified PostgresqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @param message PostgresqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IPostgresqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @param message PostgresqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSourceConfig; - - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlSourceConfig - * @throws {Error} If the payload 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.datastream.v1.PostgresqlSourceConfig; - - /** - * Verifies a PostgresqlSourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSourceConfig; - - /** - * Creates a plain object from a PostgresqlSourceConfig message. Also converts values to other types if specified. - * @param message PostgresqlSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.PostgresqlSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerColumn. */ - interface ISqlServerColumn { - - /** SqlServerColumn column */ - column?: (string|null); - - /** SqlServerColumn dataType */ - dataType?: (string|null); - - /** SqlServerColumn length */ - length?: (number|null); - - /** SqlServerColumn precision */ - precision?: (number|null); - - /** SqlServerColumn scale */ - scale?: (number|null); - - /** SqlServerColumn primaryKey */ - primaryKey?: (boolean|null); - - /** SqlServerColumn nullable */ - nullable?: (boolean|null); - - /** SqlServerColumn ordinalPosition */ - ordinalPosition?: (number|null); - } - - /** Represents a SqlServerColumn. */ - class SqlServerColumn implements ISqlServerColumn { - - /** - * Constructs a new SqlServerColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerColumn); - - /** SqlServerColumn column. */ - public column: string; - - /** SqlServerColumn dataType. */ - public dataType: string; - - /** SqlServerColumn length. */ - public length: number; - - /** SqlServerColumn precision. */ - public precision: number; - - /** SqlServerColumn scale. */ - public scale: number; - - /** SqlServerColumn primaryKey. */ - public primaryKey: boolean; - - /** SqlServerColumn nullable. */ - public nullable: boolean; - - /** SqlServerColumn ordinalPosition. */ - public ordinalPosition: number; - - /** - * Creates a new SqlServerColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerColumn instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerColumn): google.cloud.datastream.v1.SqlServerColumn; - - /** - * Encodes the specified SqlServerColumn message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. - * @param message SqlServerColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. - * @param message SqlServerColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerColumn - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerColumn; - - /** - * Decodes a SqlServerColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerColumn - * @throws {Error} If the payload 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.datastream.v1.SqlServerColumn; - - /** - * Verifies a SqlServerColumn message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerColumn; - - /** - * Creates a plain object from a SqlServerColumn message. Also converts values to other types if specified. - * @param message SqlServerColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerTable. */ - interface ISqlServerTable { - - /** SqlServerTable table */ - table?: (string|null); - - /** SqlServerTable columns */ - columns?: (google.cloud.datastream.v1.ISqlServerColumn[]|null); - } - - /** Represents a SqlServerTable. */ - class SqlServerTable implements ISqlServerTable { - - /** - * Constructs a new SqlServerTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerTable); - - /** SqlServerTable table. */ - public table: string; - - /** SqlServerTable columns. */ - public columns: google.cloud.datastream.v1.ISqlServerColumn[]; - - /** - * Creates a new SqlServerTable instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerTable instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerTable): google.cloud.datastream.v1.SqlServerTable; - - /** - * Encodes the specified SqlServerTable message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. - * @param message SqlServerTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. - * @param message SqlServerTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerTable - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerTable; - - /** - * Decodes a SqlServerTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerTable - * @throws {Error} If the payload 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.datastream.v1.SqlServerTable; - - /** - * Verifies a SqlServerTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerTable; - - /** - * Creates a plain object from a SqlServerTable message. Also converts values to other types if specified. - * @param message SqlServerTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerSchema. */ - interface ISqlServerSchema { - - /** SqlServerSchema schema */ - schema?: (string|null); - - /** SqlServerSchema tables */ - tables?: (google.cloud.datastream.v1.ISqlServerTable[]|null); - } - - /** Represents a SqlServerSchema. */ - class SqlServerSchema implements ISqlServerSchema { - - /** - * Constructs a new SqlServerSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerSchema); - - /** SqlServerSchema schema. */ - public schema: string; - - /** SqlServerSchema tables. */ - public tables: google.cloud.datastream.v1.ISqlServerTable[]; - - /** - * Creates a new SqlServerSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerSchema instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerSchema): google.cloud.datastream.v1.SqlServerSchema; - - /** - * Encodes the specified SqlServerSchema message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. - * @param message SqlServerSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. - * @param message SqlServerSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerSchema - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerSchema; - - /** - * Decodes a SqlServerSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerSchema - * @throws {Error} If the payload 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.datastream.v1.SqlServerSchema; - - /** - * Verifies a SqlServerSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerSchema; - - /** - * Creates a plain object from a SqlServerSchema message. Also converts values to other types if specified. - * @param message SqlServerSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerRdbms. */ - interface ISqlServerRdbms { - - /** SqlServerRdbms schemas */ - schemas?: (google.cloud.datastream.v1.ISqlServerSchema[]|null); - } - - /** Represents a SqlServerRdbms. */ - class SqlServerRdbms implements ISqlServerRdbms { - - /** - * Constructs a new SqlServerRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerRdbms); - - /** SqlServerRdbms schemas. */ - public schemas: google.cloud.datastream.v1.ISqlServerSchema[]; - - /** - * Creates a new SqlServerRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerRdbms): google.cloud.datastream.v1.SqlServerRdbms; - - /** - * Encodes the specified SqlServerRdbms message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. - * @param message SqlServerRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. - * @param message SqlServerRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerRdbms - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerRdbms; - - /** - * Decodes a SqlServerRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerRdbms - * @throws {Error} If the payload 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.datastream.v1.SqlServerRdbms; - - /** - * Verifies a SqlServerRdbms message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerRdbms; - - /** - * Creates a plain object from a SqlServerRdbms message. Also converts values to other types if specified. - * @param message SqlServerRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerSourceConfig. */ - interface ISqlServerSourceConfig { - - /** SqlServerSourceConfig includeObjects */ - includeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** SqlServerSourceConfig excludeObjects */ - excludeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** SqlServerSourceConfig maxConcurrentCdcTasks */ - maxConcurrentCdcTasks?: (number|null); - - /** SqlServerSourceConfig maxConcurrentBackfillTasks */ - maxConcurrentBackfillTasks?: (number|null); - - /** SqlServerSourceConfig transactionLogs */ - transactionLogs?: (google.cloud.datastream.v1.ISqlServerTransactionLogs|null); - - /** SqlServerSourceConfig changeTables */ - changeTables?: (google.cloud.datastream.v1.ISqlServerChangeTables|null); - } - - /** Represents a SqlServerSourceConfig. */ - class SqlServerSourceConfig implements ISqlServerSourceConfig { - - /** - * Constructs a new SqlServerSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerSourceConfig); - - /** SqlServerSourceConfig includeObjects. */ - public includeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** SqlServerSourceConfig excludeObjects. */ - public excludeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** SqlServerSourceConfig maxConcurrentCdcTasks. */ - public maxConcurrentCdcTasks: number; - - /** SqlServerSourceConfig maxConcurrentBackfillTasks. */ - public maxConcurrentBackfillTasks: number; - - /** SqlServerSourceConfig transactionLogs. */ - public transactionLogs?: (google.cloud.datastream.v1.ISqlServerTransactionLogs|null); - - /** SqlServerSourceConfig changeTables. */ - public changeTables?: (google.cloud.datastream.v1.ISqlServerChangeTables|null); - - /** SqlServerSourceConfig cdcMethod. */ - public cdcMethod?: ("transactionLogs"|"changeTables"); - - /** - * Creates a new SqlServerSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerSourceConfig): google.cloud.datastream.v1.SqlServerSourceConfig; - - /** - * Encodes the specified SqlServerSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. - * @param message SqlServerSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. - * @param message SqlServerSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerSourceConfig; - - /** - * Decodes a SqlServerSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerSourceConfig - * @throws {Error} If the payload 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.datastream.v1.SqlServerSourceConfig; - - /** - * Verifies a SqlServerSourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerSourceConfig; - - /** - * Creates a plain object from a SqlServerSourceConfig message. Also converts values to other types if specified. - * @param message SqlServerSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerTransactionLogs. */ - interface ISqlServerTransactionLogs { - } - - /** Represents a SqlServerTransactionLogs. */ - class SqlServerTransactionLogs implements ISqlServerTransactionLogs { - - /** - * Constructs a new SqlServerTransactionLogs. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerTransactionLogs); - - /** - * Creates a new SqlServerTransactionLogs instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerTransactionLogs instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerTransactionLogs): google.cloud.datastream.v1.SqlServerTransactionLogs; - - /** - * Encodes the specified SqlServerTransactionLogs message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. - * @param message SqlServerTransactionLogs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerTransactionLogs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerTransactionLogs message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. - * @param message SqlServerTransactionLogs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerTransactionLogs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerTransactionLogs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerTransactionLogs - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerTransactionLogs; - - /** - * Decodes a SqlServerTransactionLogs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerTransactionLogs - * @throws {Error} If the payload 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.datastream.v1.SqlServerTransactionLogs; - - /** - * Verifies a SqlServerTransactionLogs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerTransactionLogs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerTransactionLogs - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerTransactionLogs; - - /** - * Creates a plain object from a SqlServerTransactionLogs message. Also converts values to other types if specified. - * @param message SqlServerTransactionLogs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerTransactionLogs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerTransactionLogs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerTransactionLogs - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerChangeTables. */ - interface ISqlServerChangeTables { - } - - /** Represents a SqlServerChangeTables. */ - class SqlServerChangeTables implements ISqlServerChangeTables { - - /** - * Constructs a new SqlServerChangeTables. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerChangeTables); - - /** - * Creates a new SqlServerChangeTables instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerChangeTables instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerChangeTables): google.cloud.datastream.v1.SqlServerChangeTables; - - /** - * Encodes the specified SqlServerChangeTables message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. - * @param message SqlServerChangeTables message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerChangeTables, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerChangeTables message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. - * @param message SqlServerChangeTables message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerChangeTables, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerChangeTables message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerChangeTables - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerChangeTables; - - /** - * Decodes a SqlServerChangeTables message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerChangeTables - * @throws {Error} If the payload 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.datastream.v1.SqlServerChangeTables; - - /** - * Verifies a SqlServerChangeTables message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerChangeTables message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerChangeTables - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerChangeTables; - - /** - * Creates a plain object from a SqlServerChangeTables message. Also converts values to other types if specified. - * @param message SqlServerChangeTables - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerChangeTables, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerChangeTables to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerChangeTables - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlColumn. */ - interface IMysqlColumn { - - /** MysqlColumn column */ - column?: (string|null); - - /** MysqlColumn dataType */ - dataType?: (string|null); - - /** MysqlColumn length */ - length?: (number|null); - - /** MysqlColumn collation */ - collation?: (string|null); - - /** MysqlColumn primaryKey */ - primaryKey?: (boolean|null); - - /** MysqlColumn nullable */ - nullable?: (boolean|null); - - /** MysqlColumn ordinalPosition */ - ordinalPosition?: (number|null); - - /** MysqlColumn precision */ - precision?: (number|null); - - /** MysqlColumn scale */ - scale?: (number|null); - } - - /** Represents a MysqlColumn. */ - class MysqlColumn implements IMysqlColumn { - - /** - * Constructs a new MysqlColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlColumn); - - /** MysqlColumn column. */ - public column: string; - - /** MysqlColumn dataType. */ - public dataType: string; - - /** MysqlColumn length. */ - public length: number; - - /** MysqlColumn collation. */ - public collation: string; - - /** MysqlColumn primaryKey. */ - public primaryKey: boolean; - - /** MysqlColumn nullable. */ - public nullable: boolean; - - /** MysqlColumn ordinalPosition. */ - public ordinalPosition: number; - - /** MysqlColumn precision. */ - public precision: number; - - /** MysqlColumn scale. */ - public scale: number; - - /** - * Creates a new MysqlColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlColumn instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlColumn): google.cloud.datastream.v1.MysqlColumn; - - /** - * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlColumn - * @throws {Error} If the payload is not 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.datastream.v1.MysqlColumn; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlColumn - * @throws {Error} If the payload 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.datastream.v1.MysqlColumn; - - /** - * Verifies a MysqlColumn message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlColumn; - - /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @param message MysqlColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlTable. */ - interface IMysqlTable { - - /** MysqlTable table */ - table?: (string|null); - - /** MysqlTable mysqlColumns */ - mysqlColumns?: (google.cloud.datastream.v1.IMysqlColumn[]|null); - } - - /** Represents a MysqlTable. */ - class MysqlTable implements IMysqlTable { - - /** - * Constructs a new MysqlTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlTable); - - /** MysqlTable table. */ - public table: string; - - /** MysqlTable mysqlColumns. */ - public mysqlColumns: google.cloud.datastream.v1.IMysqlColumn[]; - - /** - * Creates a new MysqlTable instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlTable instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlTable): google.cloud.datastream.v1.MysqlTable; - - /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlTable - * @throws {Error} If the payload is not 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.datastream.v1.MysqlTable; - - /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlTable - * @throws {Error} If the payload 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.datastream.v1.MysqlTable; - - /** - * Verifies a MysqlTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlTable; - - /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. - * @param message MysqlTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlDatabase. */ - interface IMysqlDatabase { - - /** MysqlDatabase database */ - database?: (string|null); - - /** MysqlDatabase mysqlTables */ - mysqlTables?: (google.cloud.datastream.v1.IMysqlTable[]|null); - } - - /** Represents a MysqlDatabase. */ - class MysqlDatabase implements IMysqlDatabase { - - /** - * Constructs a new MysqlDatabase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlDatabase); - - /** MysqlDatabase database. */ - public database: string; - - /** MysqlDatabase mysqlTables. */ - public mysqlTables: google.cloud.datastream.v1.IMysqlTable[]; - - /** - * Creates a new MysqlDatabase instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlDatabase instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlDatabase): google.cloud.datastream.v1.MysqlDatabase; - - /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlDatabase - * @throws {Error} If the payload is not 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.datastream.v1.MysqlDatabase; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlDatabase - * @throws {Error} If the payload 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.datastream.v1.MysqlDatabase; - - /** - * Verifies a MysqlDatabase message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlDatabase - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlDatabase; - - /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. - * @param message MysqlDatabase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlDatabase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlDatabase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlDatabase - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlRdbms. */ - interface IMysqlRdbms { - - /** MysqlRdbms mysqlDatabases */ - mysqlDatabases?: (google.cloud.datastream.v1.IMysqlDatabase[]|null); - } - - /** Represents a MysqlRdbms. */ - class MysqlRdbms implements IMysqlRdbms { - - /** - * Constructs a new MysqlRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlRdbms); - - /** MysqlRdbms mysqlDatabases. */ - public mysqlDatabases: google.cloud.datastream.v1.IMysqlDatabase[]; - - /** - * Creates a new MysqlRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlRdbms): google.cloud.datastream.v1.MysqlRdbms; - - /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlRdbms - * @throws {Error} If the payload is not 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.datastream.v1.MysqlRdbms; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlRdbms - * @throws {Error} If the payload 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.datastream.v1.MysqlRdbms; - - /** - * Verifies a MysqlRdbms message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlRdbms; - - /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. - * @param message MysqlRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlSourceConfig. */ - interface IMysqlSourceConfig { - - /** MysqlSourceConfig includeObjects */ - includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** MysqlSourceConfig excludeObjects */ - excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** MysqlSourceConfig maxConcurrentCdcTasks */ - maxConcurrentCdcTasks?: (number|null); - - /** MysqlSourceConfig maxConcurrentBackfillTasks */ - maxConcurrentBackfillTasks?: (number|null); - - /** MysqlSourceConfig binaryLogPosition */ - binaryLogPosition?: (google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null); - - /** MysqlSourceConfig gtid */ - gtid?: (google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null); - } - - /** Represents a MysqlSourceConfig. */ - class MysqlSourceConfig implements IMysqlSourceConfig { - - /** - * Constructs a new MysqlSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlSourceConfig); - - /** MysqlSourceConfig includeObjects. */ - public includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** MysqlSourceConfig excludeObjects. */ - public excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** MysqlSourceConfig maxConcurrentCdcTasks. */ - public maxConcurrentCdcTasks: number; - - /** MysqlSourceConfig maxConcurrentBackfillTasks. */ - public maxConcurrentBackfillTasks: number; - - /** MysqlSourceConfig binaryLogPosition. */ - public binaryLogPosition?: (google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null); - - /** MysqlSourceConfig gtid. */ - public gtid?: (google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null); - - /** MysqlSourceConfig cdcMethod. */ - public cdcMethod?: ("binaryLogPosition"|"gtid"); - - /** - * Creates a new MysqlSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlSourceConfig): google.cloud.datastream.v1.MysqlSourceConfig; - - /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1.MysqlSourceConfig; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlSourceConfig - * @throws {Error} If the payload 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.datastream.v1.MysqlSourceConfig; - - /** - * Verifies a MysqlSourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig; - - /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. - * @param message MysqlSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MysqlSourceConfig { - - /** Properties of a BinaryLogPosition. */ - interface IBinaryLogPosition { - } - - /** Represents a BinaryLogPosition. */ - class BinaryLogPosition implements IBinaryLogPosition { - - /** - * Constructs a new BinaryLogPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition); - - /** - * Creates a new BinaryLogPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns BinaryLogPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; - - /** - * Encodes the specified BinaryLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. - * @param message BinaryLogPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinaryLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. - * @param message BinaryLogPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinaryLogPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinaryLogPosition - * @throws {Error} If the payload is not 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.datastream.v1.MysqlSourceConfig.BinaryLogPosition; - - /** - * Decodes a BinaryLogPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinaryLogPosition - * @throws {Error} If the payload 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.datastream.v1.MysqlSourceConfig.BinaryLogPosition; - - /** - * Verifies a BinaryLogPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinaryLogPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinaryLogPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; - - /** - * Creates a plain object from a BinaryLogPosition message. Also converts values to other types if specified. - * @param message BinaryLogPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinaryLogPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BinaryLogPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Gtid. */ - interface IGtid { - } - - /** Represents a Gtid. */ - class Gtid implements IGtid { - - /** - * Constructs a new Gtid. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IGtid); - - /** - * Creates a new Gtid instance using the specified properties. - * @param [properties] Properties to set - * @returns Gtid instance - */ - public static create(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IGtid): google.cloud.datastream.v1.MysqlSourceConfig.Gtid; - - /** - * Encodes the specified Gtid message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. - * @param message Gtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.MysqlSourceConfig.IGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Gtid message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. - * @param message Gtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.MysqlSourceConfig.IGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Gtid message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Gtid - * @throws {Error} If the payload is not 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.datastream.v1.MysqlSourceConfig.Gtid; - - /** - * Decodes a Gtid message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Gtid - * @throws {Error} If the payload 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.datastream.v1.MysqlSourceConfig.Gtid; - - /** - * Verifies a Gtid message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Gtid message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Gtid - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig.Gtid; - - /** - * Creates a plain object from a Gtid message. Also converts values to other types if specified. - * @param message Gtid - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig.Gtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Gtid to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Gtid - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceConfig. */ - interface ISourceConfig { - - /** SourceConfig sourceConnectionProfile */ - sourceConnectionProfile?: (string|null); - - /** SourceConfig oracleSourceConfig */ - oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig */ - mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); - - /** SourceConfig postgresqlSourceConfig */ - postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); - - /** SourceConfig sqlServerSourceConfig */ - sqlServerSourceConfig?: (google.cloud.datastream.v1.ISqlServerSourceConfig|null); - } - - /** Represents a SourceConfig. */ - class SourceConfig implements ISourceConfig { - - /** - * Constructs a new SourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISourceConfig); - - /** SourceConfig sourceConnectionProfile. */ - public sourceConnectionProfile: string; - - /** SourceConfig oracleSourceConfig. */ - public oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig. */ - public mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); - - /** SourceConfig postgresqlSourceConfig. */ - public postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); - - /** SourceConfig sqlServerSourceConfig. */ - public sqlServerSourceConfig?: (google.cloud.datastream.v1.ISqlServerSourceConfig|null); - - /** SourceConfig sourceStreamConfig. */ - public sourceStreamConfig?: ("oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"|"sqlServerSourceConfig"); - - /** - * Creates a new SourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.ISourceConfig): google.cloud.datastream.v1.SourceConfig; - - /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceConfig - * @throws {Error} If the payload is not 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.datastream.v1.SourceConfig; - - /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceConfig - * @throws {Error} If the payload 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.datastream.v1.SourceConfig; - - /** - * Verifies a SourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceConfig; - - /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. - * @param message SourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AvroFileFormat. */ - interface IAvroFileFormat { - } - - /** Represents an AvroFileFormat. */ - class AvroFileFormat implements IAvroFileFormat { - - /** - * Constructs a new AvroFileFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IAvroFileFormat); - - /** - * Creates a new AvroFileFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroFileFormat instance - */ - public static create(properties?: google.cloud.datastream.v1.IAvroFileFormat): google.cloud.datastream.v1.AvroFileFormat; - - /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroFileFormat - * @throws {Error} If the payload is not 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.datastream.v1.AvroFileFormat; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroFileFormat - * @throws {Error} If the payload 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.datastream.v1.AvroFileFormat; - - /** - * Verifies an AvroFileFormat message. - * @param message Plain 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 AvroFileFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroFileFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.AvroFileFormat; - - /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. - * @param message AvroFileFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.AvroFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroFileFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroFileFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonFileFormat. */ - interface IJsonFileFormat { - - /** JsonFileFormat schemaFileFormat */ - schemaFileFormat?: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null); - - /** JsonFileFormat compression */ - compression?: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null); - } - - /** Represents a JsonFileFormat. */ - class JsonFileFormat implements IJsonFileFormat { - - /** - * Constructs a new JsonFileFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IJsonFileFormat); - - /** JsonFileFormat schemaFileFormat. */ - public schemaFileFormat: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat); - - /** JsonFileFormat compression. */ - public compression: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression); - - /** - * Creates a new JsonFileFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonFileFormat instance - */ - public static create(properties?: google.cloud.datastream.v1.IJsonFileFormat): google.cloud.datastream.v1.JsonFileFormat; - - /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonFileFormat - * @throws {Error} If the payload is not 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.datastream.v1.JsonFileFormat; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonFileFormat - * @throws {Error} If the payload 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.datastream.v1.JsonFileFormat; - - /** - * Verifies a JsonFileFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonFileFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.JsonFileFormat; - - /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. - * @param message JsonFileFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.JsonFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonFileFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonFileFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace JsonFileFormat { - - /** SchemaFileFormat enum. */ - enum SchemaFileFormat { - SCHEMA_FILE_FORMAT_UNSPECIFIED = 0, - NO_SCHEMA_FILE = 1, - AVRO_SCHEMA_FILE = 2 - } - - /** JsonCompression enum. */ - enum JsonCompression { - JSON_COMPRESSION_UNSPECIFIED = 0, - NO_COMPRESSION = 1, - GZIP = 2 - } - } - - /** Properties of a GcsDestinationConfig. */ - interface IGcsDestinationConfig { - - /** GcsDestinationConfig path */ - path?: (string|null); - - /** GcsDestinationConfig fileRotationMb */ - fileRotationMb?: (number|null); - - /** GcsDestinationConfig fileRotationInterval */ - fileRotationInterval?: (google.protobuf.IDuration|null); - - /** GcsDestinationConfig avroFileFormat */ - avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); - - /** GcsDestinationConfig jsonFileFormat */ - jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); - } - - /** Represents a GcsDestinationConfig. */ - class GcsDestinationConfig implements IGcsDestinationConfig { - - /** - * Constructs a new GcsDestinationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IGcsDestinationConfig); - - /** GcsDestinationConfig path. */ - public path: string; - - /** GcsDestinationConfig fileRotationMb. */ - public fileRotationMb: number; - - /** GcsDestinationConfig fileRotationInterval. */ - public fileRotationInterval?: (google.protobuf.IDuration|null); - - /** GcsDestinationConfig avroFileFormat. */ - public avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); - - /** GcsDestinationConfig jsonFileFormat. */ - public jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); - - /** GcsDestinationConfig fileFormat. */ - public fileFormat?: ("avroFileFormat"|"jsonFileFormat"); - - /** - * Creates a new GcsDestinationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsDestinationConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IGcsDestinationConfig): google.cloud.datastream.v1.GcsDestinationConfig; - - /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsDestinationConfig - * @throws {Error} If the payload is not 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.datastream.v1.GcsDestinationConfig; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsDestinationConfig - * @throws {Error} If the payload 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.datastream.v1.GcsDestinationConfig; - - /** - * Verifies a GcsDestinationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsDestinationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsDestinationConfig; - - /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. - * @param message GcsDestinationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.GcsDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsDestinationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsDestinationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BigQueryDestinationConfig. */ - interface IBigQueryDestinationConfig { - - /** BigQueryDestinationConfig singleTargetDataset */ - singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); - - /** BigQueryDestinationConfig sourceHierarchyDatasets */ - sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); - - /** BigQueryDestinationConfig dataFreshness */ - dataFreshness?: (google.protobuf.IDuration|null); - - /** BigQueryDestinationConfig merge */ - merge?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null); - - /** BigQueryDestinationConfig appendOnly */ - appendOnly?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null); - } - - /** Represents a BigQueryDestinationConfig. */ - class BigQueryDestinationConfig implements IBigQueryDestinationConfig { - - /** - * Constructs a new BigQueryDestinationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig); - - /** BigQueryDestinationConfig singleTargetDataset. */ - public singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); - - /** BigQueryDestinationConfig sourceHierarchyDatasets. */ - public sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); - - /** BigQueryDestinationConfig dataFreshness. */ - public dataFreshness?: (google.protobuf.IDuration|null); - - /** BigQueryDestinationConfig merge. */ - public merge?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null); - - /** BigQueryDestinationConfig appendOnly. */ - public appendOnly?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null); - - /** BigQueryDestinationConfig datasetConfig. */ - public datasetConfig?: ("singleTargetDataset"|"sourceHierarchyDatasets"); - - /** BigQueryDestinationConfig writeMode. */ - public writeMode?: ("merge"|"appendOnly"); - - /** - * Creates a new BigQueryDestinationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDestinationConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig): google.cloud.datastream.v1.BigQueryDestinationConfig; - - /** - * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @param message BigQueryDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @param message BigQueryDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDestinationConfig - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig; - - /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDestinationConfig - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig; - - /** - * Verifies a BigQueryDestinationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDestinationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig; - - /** - * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. - * @param message BigQueryDestinationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDestinationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDestinationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryDestinationConfig { - - /** Properties of a SingleTargetDataset. */ - interface ISingleTargetDataset { - - /** SingleTargetDataset datasetId */ - datasetId?: (string|null); - } - - /** Represents a SingleTargetDataset. */ - class SingleTargetDataset implements ISingleTargetDataset { - - /** - * Constructs a new SingleTargetDataset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset); - - /** SingleTargetDataset datasetId. */ - public datasetId: string; - - /** - * Creates a new SingleTargetDataset instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleTargetDataset instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; - - /** - * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @param message SingleTargetDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @param message SingleTargetDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleTargetDataset - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; - - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleTargetDataset - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; - - /** - * Verifies a SingleTargetDataset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SingleTargetDataset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleTargetDataset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; - - /** - * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. - * @param message SingleTargetDataset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleTargetDataset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleTargetDataset - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SourceHierarchyDatasets. */ - interface ISourceHierarchyDatasets { - - /** SourceHierarchyDatasets datasetTemplate */ - datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); - } - - /** Represents a SourceHierarchyDatasets. */ - class SourceHierarchyDatasets implements ISourceHierarchyDatasets { - - /** - * Constructs a new SourceHierarchyDatasets. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets); - - /** SourceHierarchyDatasets datasetTemplate. */ - public datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); - - /** - * Creates a new SourceHierarchyDatasets instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceHierarchyDatasets instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; - - /** - * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @param message SourceHierarchyDatasets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @param message SourceHierarchyDatasets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceHierarchyDatasets - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceHierarchyDatasets - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; - - /** - * Verifies a SourceHierarchyDatasets message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceHierarchyDatasets - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; - - /** - * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. - * @param message SourceHierarchyDatasets - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceHierarchyDatasets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceHierarchyDatasets - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceHierarchyDatasets { - - /** Properties of a DatasetTemplate. */ - interface IDatasetTemplate { - - /** DatasetTemplate location */ - location?: (string|null); - - /** DatasetTemplate datasetIdPrefix */ - datasetIdPrefix?: (string|null); - - /** DatasetTemplate kmsKeyName */ - kmsKeyName?: (string|null); - } - - /** Represents a DatasetTemplate. */ - class DatasetTemplate implements IDatasetTemplate { - - /** - * Constructs a new DatasetTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate); - - /** DatasetTemplate location. */ - public location: string; - - /** DatasetTemplate datasetIdPrefix. */ - public datasetIdPrefix: string; - - /** DatasetTemplate kmsKeyName. */ - public kmsKeyName: string; - - /** - * Creates a new DatasetTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns DatasetTemplate instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @param message DatasetTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @param message DatasetTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatasetTemplate - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatasetTemplate - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Verifies a DatasetTemplate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatasetTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatasetTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. - * @param message DatasetTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatasetTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatasetTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an AppendOnly. */ - interface IAppendOnly { - } - - /** Represents an AppendOnly. */ - class AppendOnly implements IAppendOnly { - - /** - * Constructs a new AppendOnly. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly); - - /** - * Creates a new AppendOnly instance using the specified properties. - * @param [properties] Properties to set - * @returns AppendOnly instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly): google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly; - - /** - * Encodes the specified AppendOnly message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. - * @param message AppendOnly message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppendOnly message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. - * @param message AppendOnly message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppendOnly message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppendOnly - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig.AppendOnly; - - /** - * Decodes an AppendOnly message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppendOnly - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig.AppendOnly; - - /** - * Verifies an AppendOnly message. - * @param message Plain 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 AppendOnly message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppendOnly - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly; - - /** - * Creates a plain object from an AppendOnly message. Also converts values to other types if specified. - * @param message AppendOnly - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppendOnly to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppendOnly - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Merge. */ - interface IMerge { - } - - /** Represents a Merge. */ - class Merge implements IMerge { - - /** - * Constructs a new Merge. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge); - - /** - * Creates a new Merge instance using the specified properties. - * @param [properties] Properties to set - * @returns Merge instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge): google.cloud.datastream.v1.BigQueryDestinationConfig.Merge; - - /** - * Encodes the specified Merge message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. - * @param message Merge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Merge message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. - * @param message Merge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Merge message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Merge - * @throws {Error} If the payload is not 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.datastream.v1.BigQueryDestinationConfig.Merge; - - /** - * Decodes a Merge message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Merge - * @throws {Error} If the payload 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.datastream.v1.BigQueryDestinationConfig.Merge; - - /** - * Verifies a Merge message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Merge message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Merge - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.Merge; - - /** - * Creates a plain object from a Merge message. Also converts values to other types if specified. - * @param message Merge - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.Merge, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Merge to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Merge - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DestinationConfig. */ - interface IDestinationConfig { - - /** DestinationConfig destinationConnectionProfile */ - destinationConnectionProfile?: (string|null); - - /** DestinationConfig gcsDestinationConfig */ - gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); - - /** DestinationConfig bigqueryDestinationConfig */ - bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); - } - - /** Represents a DestinationConfig. */ - class DestinationConfig implements IDestinationConfig { - - /** - * Constructs a new DestinationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IDestinationConfig); - - /** DestinationConfig destinationConnectionProfile. */ - public destinationConnectionProfile: string; - - /** DestinationConfig gcsDestinationConfig. */ - public gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); - - /** DestinationConfig bigqueryDestinationConfig. */ - public bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); - - /** DestinationConfig destinationStreamConfig. */ - public destinationStreamConfig?: ("gcsDestinationConfig"|"bigqueryDestinationConfig"); - - /** - * Creates a new DestinationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DestinationConfig instance - */ - public static create(properties?: google.cloud.datastream.v1.IDestinationConfig): google.cloud.datastream.v1.DestinationConfig; - - /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DestinationConfig - * @throws {Error} If the payload is not 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.datastream.v1.DestinationConfig; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestinationConfig - * @throws {Error} If the payload 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.datastream.v1.DestinationConfig; - - /** - * Verifies a DestinationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DestinationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DestinationConfig; - - /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. - * @param message DestinationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.DestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DestinationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DestinationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Stream. */ - interface IStream { - - /** Stream name */ - name?: (string|null); - - /** Stream createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels */ - labels?: ({ [k: string]: string }|null); - - /** Stream displayName */ - displayName?: (string|null); - - /** Stream sourceConfig */ - sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); - - /** Stream destinationConfig */ - destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); - - /** Stream state */ - state?: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State|null); - - /** Stream backfillAll */ - backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone */ - backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); - - /** Stream customerManagedEncryptionKey */ - customerManagedEncryptionKey?: (string|null); - - /** Stream lastRecoveryTime */ - lastRecoveryTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Stream. */ - class Stream implements IStream { - - /** - * Constructs a new Stream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStream); - - /** Stream name. */ - public name: string; - - /** Stream createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels. */ - public labels: { [k: string]: string }; - - /** Stream displayName. */ - public displayName: string; - - /** Stream sourceConfig. */ - public sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); - - /** Stream destinationConfig. */ - public destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); - - /** Stream state. */ - public state: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State); - - /** Stream backfillAll. */ - public backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone. */ - public backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors. */ - public errors: google.cloud.datastream.v1.IError[]; - - /** Stream customerManagedEncryptionKey. */ - public customerManagedEncryptionKey?: (string|null); - - /** Stream lastRecoveryTime. */ - public lastRecoveryTime?: (google.protobuf.ITimestamp|null); - - /** Stream backfillStrategy. */ - public backfillStrategy?: ("backfillAll"|"backfillNone"); - - /** Stream _customerManagedEncryptionKey. */ - public _customerManagedEncryptionKey?: "customerManagedEncryptionKey"; - - /** - * Creates a new Stream instance using the specified properties. - * @param [properties] Properties to set - * @returns Stream instance - */ - public static create(properties?: google.cloud.datastream.v1.IStream): google.cloud.datastream.v1.Stream; - - /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stream - * @throws {Error} If the payload is not 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.datastream.v1.Stream; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stream - * @throws {Error} If the payload 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.datastream.v1.Stream; - - /** - * Verifies a Stream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @param message Stream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Stream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Stream - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Stream { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_STARTED = 1, - RUNNING = 2, - PAUSED = 3, - MAINTENANCE = 4, - FAILED = 5, - FAILED_PERMANENTLY = 6, - STARTING = 7, - DRAINING = 8 - } - - /** Properties of a BackfillAllStrategy. */ - interface IBackfillAllStrategy { - - /** BackfillAllStrategy oracleExcludedObjects */ - oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** BackfillAllStrategy mysqlExcludedObjects */ - mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** BackfillAllStrategy postgresqlExcludedObjects */ - postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** BackfillAllStrategy sqlServerExcludedObjects */ - sqlServerExcludedObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - } - - /** Represents a BackfillAllStrategy. */ - class BackfillAllStrategy implements IBackfillAllStrategy { - - /** - * Constructs a new BackfillAllStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy); - - /** BackfillAllStrategy oracleExcludedObjects. */ - public oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); - - /** BackfillAllStrategy mysqlExcludedObjects. */ - public mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - - /** BackfillAllStrategy postgresqlExcludedObjects. */ - public postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - - /** BackfillAllStrategy sqlServerExcludedObjects. */ - public sqlServerExcludedObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - - /** BackfillAllStrategy excludedObjects. */ - public excludedObjects?: ("oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"|"sqlServerExcludedObjects"); - - /** - * Creates a new BackfillAllStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillAllStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy): google.cloud.datastream.v1.Stream.BackfillAllStrategy; - - /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillAllStrategy - * @throws {Error} If the payload is not 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.datastream.v1.Stream.BackfillAllStrategy; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillAllStrategy - * @throws {Error} If the payload 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.datastream.v1.Stream.BackfillAllStrategy; - - /** - * Verifies a BackfillAllStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillAllStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillAllStrategy; - - /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. - * @param message BackfillAllStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Stream.BackfillAllStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillAllStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillAllStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackfillNoneStrategy. */ - interface IBackfillNoneStrategy { - } - - /** Represents a BackfillNoneStrategy. */ - class BackfillNoneStrategy implements IBackfillNoneStrategy { - - /** - * Constructs a new BackfillNoneStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy); - - /** - * Creates a new BackfillNoneStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillNoneStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; - - /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillNoneStrategy - * @throws {Error} If the payload is not 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.datastream.v1.Stream.BackfillNoneStrategy; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillNoneStrategy - * @throws {Error} If the payload 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.datastream.v1.Stream.BackfillNoneStrategy; - - /** - * Verifies a BackfillNoneStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillNoneStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; - - /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. - * @param message BackfillNoneStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Stream.BackfillNoneStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillNoneStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillNoneStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a StreamObject. */ - interface IStreamObject { - - /** StreamObject name */ - name?: (string|null); - - /** StreamObject createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** StreamObject updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** StreamObject displayName */ - displayName?: (string|null); - - /** StreamObject errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); - - /** StreamObject backfillJob */ - backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); - - /** StreamObject sourceObject */ - sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); - } - - /** Represents a StreamObject. */ - class StreamObject implements IStreamObject { - - /** - * Constructs a new StreamObject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IStreamObject); - - /** StreamObject name. */ - public name: string; - - /** StreamObject createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** StreamObject updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** StreamObject displayName. */ - public displayName: string; - - /** StreamObject errors. */ - public errors: google.cloud.datastream.v1.IError[]; - - /** StreamObject backfillJob. */ - public backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); - - /** StreamObject sourceObject. */ - public sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); - - /** - * Creates a new StreamObject instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamObject instance - */ - public static create(properties?: google.cloud.datastream.v1.IStreamObject): google.cloud.datastream.v1.StreamObject; - - /** - * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @param message StreamObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @param message StreamObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamObject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamObject - * @throws {Error} If the payload is not 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.datastream.v1.StreamObject; - - /** - * Decodes a StreamObject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamObject - * @throws {Error} If the payload 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.datastream.v1.StreamObject; - - /** - * Verifies a StreamObject message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamObject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamObject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StreamObject; - - /** - * Creates a plain object from a StreamObject message. Also converts values to other types if specified. - * @param message StreamObject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.StreamObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamObject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StreamObject - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SourceObjectIdentifier. */ - interface ISourceObjectIdentifier { - - /** SourceObjectIdentifier oracleIdentifier */ - oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); - - /** SourceObjectIdentifier mysqlIdentifier */ - mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); - - /** SourceObjectIdentifier postgresqlIdentifier */ - postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); - - /** SourceObjectIdentifier sqlServerIdentifier */ - sqlServerIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null); - } - - /** Represents a SourceObjectIdentifier. */ - class SourceObjectIdentifier implements ISourceObjectIdentifier { - - /** - * Constructs a new SourceObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier); - - /** SourceObjectIdentifier oracleIdentifier. */ - public oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); - - /** SourceObjectIdentifier mysqlIdentifier. */ - public mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); - - /** SourceObjectIdentifier postgresqlIdentifier. */ - public postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); - - /** SourceObjectIdentifier sqlServerIdentifier. */ - public sqlServerIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null); - - /** SourceObjectIdentifier sourceIdentifier. */ - public sourceIdentifier?: ("oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"|"sqlServerIdentifier"); - - /** - * Creates a new SourceObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier; - - /** - * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @param message SourceObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @param message SourceObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceObjectIdentifier - * @throws {Error} If the payload is not 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.datastream.v1.SourceObjectIdentifier; - - /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceObjectIdentifier - * @throws {Error} If the payload 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.datastream.v1.SourceObjectIdentifier; - - /** - * Verifies a SourceObjectIdentifier message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier; - - /** - * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. - * @param message SourceObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceObjectIdentifier { - - /** Properties of an OracleObjectIdentifier. */ - interface IOracleObjectIdentifier { - - /** OracleObjectIdentifier schema */ - schema?: (string|null); - - /** OracleObjectIdentifier table */ - table?: (string|null); - } - - /** Represents an OracleObjectIdentifier. */ - class OracleObjectIdentifier implements IOracleObjectIdentifier { - - /** - * Constructs a new OracleObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier); - - /** OracleObjectIdentifier schema. */ - public schema: string; - - /** OracleObjectIdentifier table. */ - public table: string; - - /** - * Creates a new OracleObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @param message OracleObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @param message OracleObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleObjectIdentifier - * @throws {Error} If the payload is not 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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleObjectIdentifier - * @throws {Error} If the payload 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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Verifies an OracleObjectIdentifier message. - * @param message Plain 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 OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. - * @param message OracleObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlObjectIdentifier. */ - interface IPostgresqlObjectIdentifier { - - /** PostgresqlObjectIdentifier schema */ - schema?: (string|null); - - /** PostgresqlObjectIdentifier table */ - table?: (string|null); - } - - /** Represents a PostgresqlObjectIdentifier. */ - class PostgresqlObjectIdentifier implements IPostgresqlObjectIdentifier { - - /** - * Constructs a new PostgresqlObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier); - - /** PostgresqlObjectIdentifier schema. */ - public schema: string; - - /** PostgresqlObjectIdentifier table. */ - public table: string; - - /** - * Creates a new PostgresqlObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; - - /** - * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @param message PostgresqlObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @param message PostgresqlObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlObjectIdentifier - * @throws {Error} If the payload is not 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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; - - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlObjectIdentifier - * @throws {Error} If the payload 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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; - - /** - * Verifies a PostgresqlObjectIdentifier message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; - - /** - * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. - * @param message PostgresqlObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlObjectIdentifier. */ - interface IMysqlObjectIdentifier { - - /** MysqlObjectIdentifier database */ - database?: (string|null); - - /** MysqlObjectIdentifier table */ - table?: (string|null); - } - - /** Represents a MysqlObjectIdentifier. */ - class MysqlObjectIdentifier implements IMysqlObjectIdentifier { - - /** - * Constructs a new MysqlObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier); - - /** MysqlObjectIdentifier database. */ - public database: string; - - /** MysqlObjectIdentifier table. */ - public table: string; - - /** - * Creates a new MysqlObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; - - /** - * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @param message MysqlObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @param message MysqlObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlObjectIdentifier - * @throws {Error} If the payload is not 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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; - - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlObjectIdentifier - * @throws {Error} If the payload 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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; - - /** - * Verifies a MysqlObjectIdentifier message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; - - /** - * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. - * @param message MysqlObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlServerObjectIdentifier. */ - interface ISqlServerObjectIdentifier { - - /** SqlServerObjectIdentifier schema */ - schema?: (string|null); - - /** SqlServerObjectIdentifier table */ - table?: (string|null); - } - - /** Represents a SqlServerObjectIdentifier. */ - class SqlServerObjectIdentifier implements ISqlServerObjectIdentifier { - - /** - * Constructs a new SqlServerObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier); - - /** SqlServerObjectIdentifier schema. */ - public schema: string; - - /** SqlServerObjectIdentifier table. */ - public table: string; - - /** - * Creates a new SqlServerObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; - - /** - * Encodes the specified SqlServerObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. - * @param message SqlServerObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. - * @param message SqlServerObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerObjectIdentifier - * @throws {Error} If the payload is not 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.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; - - /** - * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerObjectIdentifier - * @throws {Error} If the payload 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.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; - - /** - * Verifies a SqlServerObjectIdentifier message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; - - /** - * Creates a plain object from a SqlServerObjectIdentifier message. Also converts values to other types if specified. - * @param message SqlServerObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a BackfillJob. */ - interface IBackfillJob { - - /** BackfillJob state */ - state?: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State|null); - - /** BackfillJob trigger */ - trigger?: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger|null); - - /** BackfillJob lastStartTime */ - lastStartTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob lastEndTime */ - lastEndTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); - } - - /** Represents a BackfillJob. */ - class BackfillJob implements IBackfillJob { - - /** - * Constructs a new BackfillJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IBackfillJob); - - /** BackfillJob state. */ - public state: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State); - - /** BackfillJob trigger. */ - public trigger: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger); - - /** BackfillJob lastStartTime. */ - public lastStartTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob lastEndTime. */ - public lastEndTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob errors. */ - public errors: google.cloud.datastream.v1.IError[]; - - /** - * Creates a new BackfillJob instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillJob instance - */ - public static create(properties?: google.cloud.datastream.v1.IBackfillJob): google.cloud.datastream.v1.BackfillJob; - - /** - * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @param message BackfillJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @param message BackfillJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillJob - * @throws {Error} If the payload is not 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.datastream.v1.BackfillJob; - - /** - * Decodes a BackfillJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillJob - * @throws {Error} If the payload 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.datastream.v1.BackfillJob; - - /** - * Verifies a BackfillJob message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackfillJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BackfillJob; - - /** - * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. - * @param message BackfillJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BackfillJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackfillJob { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_STARTED = 1, - PENDING = 2, - ACTIVE = 3, - STOPPED = 4, - FAILED = 5, - COMPLETED = 6, - UNSUPPORTED = 7 - } - - /** Trigger enum. */ - enum Trigger { - TRIGGER_UNSPECIFIED = 0, - AUTOMATIC = 1, - MANUAL = 2 - } - } - - /** Properties of an Error. */ - interface IError { - - /** Error reason */ - reason?: (string|null); - - /** Error errorUuid */ - errorUuid?: (string|null); - - /** Error message */ - message?: (string|null); - - /** Error errorTime */ - errorTime?: (google.protobuf.ITimestamp|null); - - /** Error details */ - details?: ({ [k: string]: string }|null); - } - - /** Represents an Error. */ - class Error implements IError { - - /** - * Constructs a new Error. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IError); - - /** Error reason. */ - public reason: string; - - /** Error errorUuid. */ - public errorUuid: string; - - /** Error message. */ - public message: string; - - /** Error errorTime. */ - public errorTime?: (google.protobuf.ITimestamp|null); - - /** Error details. */ - public details: { [k: string]: string }; - - /** - * Creates a new Error instance using the specified properties. - * @param [properties] Properties to set - * @returns Error instance - */ - public static create(properties?: google.cloud.datastream.v1.IError): google.cloud.datastream.v1.Error; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Error message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Error - * @throws {Error} If the payload is not 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.datastream.v1.Error; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Error - * @throws {Error} If the payload 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.datastream.v1.Error; - - /** - * Verifies an Error message. - * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Error - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Error; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @param message Error - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Error to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Error - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidationResult. */ - interface IValidationResult { - - /** ValidationResult validations */ - validations?: (google.cloud.datastream.v1.IValidation[]|null); - } - - /** Represents a ValidationResult. */ - class ValidationResult implements IValidationResult { - - /** - * Constructs a new ValidationResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IValidationResult); - - /** ValidationResult validations. */ - public validations: google.cloud.datastream.v1.IValidation[]; - - /** - * Creates a new ValidationResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidationResult instance - */ - public static create(properties?: google.cloud.datastream.v1.IValidationResult): google.cloud.datastream.v1.ValidationResult; - - /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidationResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidationResult - * @throws {Error} If the payload is not 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.datastream.v1.ValidationResult; - - /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidationResult - * @throws {Error} If the payload 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.datastream.v1.ValidationResult; - - /** - * Verifies a ValidationResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidationResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationResult; - - /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @param message ValidationResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidationResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidationResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Validation. */ - interface IValidation { - - /** Validation description */ - description?: (string|null); - - /** Validation state */ - state?: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State|null); - - /** Validation message */ - message?: (google.cloud.datastream.v1.IValidationMessage[]|null); - - /** Validation code */ - code?: (string|null); - } - - /** Represents a Validation. */ - class Validation implements IValidation { - - /** - * Constructs a new Validation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IValidation); - - /** Validation description. */ - public description: string; - - /** Validation state. */ - public state: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State); - - /** Validation message. */ - public message: google.cloud.datastream.v1.IValidationMessage[]; - - /** Validation code. */ - public code: string; - - /** - * Creates a new Validation instance using the specified properties. - * @param [properties] Properties to set - * @returns Validation instance - */ - public static create(properties?: google.cloud.datastream.v1.IValidation): google.cloud.datastream.v1.Validation; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Validation - * @throws {Error} If the payload is not 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.datastream.v1.Validation; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Validation - * @throws {Error} If the payload 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.datastream.v1.Validation; - - /** - * Verifies a Validation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Validation; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @param message Validation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Validation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Validation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_EXECUTED = 1, - FAILED = 2, - PASSED = 3, - WARNING = 4 - } - } - - /** Properties of a ValidationMessage. */ - interface IValidationMessage { - - /** ValidationMessage message */ - message?: (string|null); - - /** ValidationMessage level */ - level?: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level|null); - - /** ValidationMessage metadata */ - metadata?: ({ [k: string]: string }|null); - - /** ValidationMessage code */ - code?: (string|null); - } - - /** Represents a ValidationMessage. */ - class ValidationMessage implements IValidationMessage { - - /** - * Constructs a new ValidationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IValidationMessage); - - /** ValidationMessage message. */ - public message: string; - - /** ValidationMessage level. */ - public level: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level); - - /** ValidationMessage metadata. */ - public metadata: { [k: string]: string }; - - /** ValidationMessage code. */ - public code: string; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidationMessage instance - */ - public static create(properties?: google.cloud.datastream.v1.IValidationMessage): google.cloud.datastream.v1.ValidationMessage; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidationMessage - * @throws {Error} If the payload is not 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.datastream.v1.ValidationMessage; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidationMessage - * @throws {Error} If the payload 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.datastream.v1.ValidationMessage; - - /** - * Verifies a ValidationMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidationMessage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationMessage; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @param message ValidationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidationMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidationMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ValidationMessage { - - /** Level enum. */ - enum Level { - LEVEL_UNSPECIFIED = 0, - WARNING = 1, - ERROR = 2 - } - } - - /** Properties of a CdcStrategy. */ - interface ICdcStrategy { - - /** CdcStrategy mostRecentStartPosition */ - mostRecentStartPosition?: (google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null); - - /** CdcStrategy nextAvailableStartPosition */ - nextAvailableStartPosition?: (google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null); - - /** CdcStrategy specificStartPosition */ - specificStartPosition?: (google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null); - } - - /** Represents a CdcStrategy. */ - class CdcStrategy implements ICdcStrategy { - - /** - * Constructs a new CdcStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ICdcStrategy); - - /** CdcStrategy mostRecentStartPosition. */ - public mostRecentStartPosition?: (google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null); - - /** CdcStrategy nextAvailableStartPosition. */ - public nextAvailableStartPosition?: (google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null); - - /** CdcStrategy specificStartPosition. */ - public specificStartPosition?: (google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null); - - /** CdcStrategy startPosition. */ - public startPosition?: ("mostRecentStartPosition"|"nextAvailableStartPosition"|"specificStartPosition"); - - /** - * Creates a new CdcStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns CdcStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1.ICdcStrategy): google.cloud.datastream.v1.CdcStrategy; - - /** - * Encodes the specified CdcStrategy message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. - * @param message CdcStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ICdcStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CdcStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. - * @param message CdcStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ICdcStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CdcStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CdcStrategy - * @throws {Error} If the payload is not 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.datastream.v1.CdcStrategy; - - /** - * Decodes a CdcStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CdcStrategy - * @throws {Error} If the payload 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.datastream.v1.CdcStrategy; - - /** - * Verifies a CdcStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CdcStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CdcStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy; - - /** - * Creates a plain object from a CdcStrategy message. Also converts values to other types if specified. - * @param message CdcStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CdcStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CdcStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CdcStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CdcStrategy { - - /** Properties of a MostRecentStartPosition. */ - interface IMostRecentStartPosition { - } - - /** Represents a MostRecentStartPosition. */ - class MostRecentStartPosition implements IMostRecentStartPosition { - - /** - * Constructs a new MostRecentStartPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition); - - /** - * Creates a new MostRecentStartPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns MostRecentStartPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; - - /** - * Encodes the specified MostRecentStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. - * @param message MostRecentStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MostRecentStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. - * @param message MostRecentStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MostRecentStartPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MostRecentStartPosition - * @throws {Error} If the payload is not 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.datastream.v1.CdcStrategy.MostRecentStartPosition; - - /** - * Decodes a MostRecentStartPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MostRecentStartPosition - * @throws {Error} If the payload 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.datastream.v1.CdcStrategy.MostRecentStartPosition; - - /** - * Verifies a MostRecentStartPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MostRecentStartPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MostRecentStartPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; - - /** - * Creates a plain object from a MostRecentStartPosition message. Also converts values to other types if specified. - * @param message MostRecentStartPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MostRecentStartPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MostRecentStartPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NextAvailableStartPosition. */ - interface INextAvailableStartPosition { - } - - /** Represents a NextAvailableStartPosition. */ - class NextAvailableStartPosition implements INextAvailableStartPosition { - - /** - * Constructs a new NextAvailableStartPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition); - - /** - * Creates a new NextAvailableStartPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns NextAvailableStartPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; - - /** - * Encodes the specified NextAvailableStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. - * @param message NextAvailableStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NextAvailableStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. - * @param message NextAvailableStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NextAvailableStartPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NextAvailableStartPosition - * @throws {Error} If the payload is not 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.datastream.v1.CdcStrategy.NextAvailableStartPosition; - - /** - * Decodes a NextAvailableStartPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NextAvailableStartPosition - * @throws {Error} If the payload 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.datastream.v1.CdcStrategy.NextAvailableStartPosition; - - /** - * Verifies a NextAvailableStartPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NextAvailableStartPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NextAvailableStartPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; - - /** - * Creates a plain object from a NextAvailableStartPosition message. Also converts values to other types if specified. - * @param message NextAvailableStartPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NextAvailableStartPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NextAvailableStartPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SpecificStartPosition. */ - interface ISpecificStartPosition { - - /** SpecificStartPosition mysqlLogPosition */ - mysqlLogPosition?: (google.cloud.datastream.v1.IMysqlLogPosition|null); - - /** SpecificStartPosition oracleScnPosition */ - oracleScnPosition?: (google.cloud.datastream.v1.IOracleScnPosition|null); - - /** SpecificStartPosition sqlServerLsnPosition */ - sqlServerLsnPosition?: (google.cloud.datastream.v1.ISqlServerLsnPosition|null); - } - - /** Represents a SpecificStartPosition. */ - class SpecificStartPosition implements ISpecificStartPosition { - - /** - * Constructs a new SpecificStartPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition); - - /** SpecificStartPosition mysqlLogPosition. */ - public mysqlLogPosition?: (google.cloud.datastream.v1.IMysqlLogPosition|null); - - /** SpecificStartPosition oracleScnPosition. */ - public oracleScnPosition?: (google.cloud.datastream.v1.IOracleScnPosition|null); - - /** SpecificStartPosition sqlServerLsnPosition. */ - public sqlServerLsnPosition?: (google.cloud.datastream.v1.ISqlServerLsnPosition|null); - - /** SpecificStartPosition position. */ - public position?: ("mysqlLogPosition"|"oracleScnPosition"|"sqlServerLsnPosition"); - - /** - * Creates a new SpecificStartPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns SpecificStartPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition): google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition; - - /** - * Encodes the specified SpecificStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. - * @param message SpecificStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SpecificStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. - * @param message SpecificStartPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SpecificStartPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpecificStartPosition - * @throws {Error} If the payload is not 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.datastream.v1.CdcStrategy.SpecificStartPosition; - - /** - * Decodes a SpecificStartPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpecificStartPosition - * @throws {Error} If the payload 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.datastream.v1.CdcStrategy.SpecificStartPosition; - - /** - * Verifies a SpecificStartPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SpecificStartPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpecificStartPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition; - - /** - * Creates a plain object from a SpecificStartPosition message. Also converts values to other types if specified. - * @param message SpecificStartPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SpecificStartPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SpecificStartPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SqlServerLsnPosition. */ - interface ISqlServerLsnPosition { - - /** SqlServerLsnPosition lsn */ - lsn?: (string|null); - } - - /** Represents a SqlServerLsnPosition. */ - class SqlServerLsnPosition implements ISqlServerLsnPosition { - - /** - * Constructs a new SqlServerLsnPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.ISqlServerLsnPosition); - - /** SqlServerLsnPosition lsn. */ - public lsn: string; - - /** - * Creates a new SqlServerLsnPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlServerLsnPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.ISqlServerLsnPosition): google.cloud.datastream.v1.SqlServerLsnPosition; - - /** - * Encodes the specified SqlServerLsnPosition message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. - * @param message SqlServerLsnPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.ISqlServerLsnPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlServerLsnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. - * @param message SqlServerLsnPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerLsnPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlServerLsnPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlServerLsnPosition - * @throws {Error} If the payload is not 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.datastream.v1.SqlServerLsnPosition; - - /** - * Decodes a SqlServerLsnPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlServerLsnPosition - * @throws {Error} If the payload 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.datastream.v1.SqlServerLsnPosition; - - /** - * Verifies a SqlServerLsnPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlServerLsnPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlServerLsnPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerLsnPosition; - - /** - * Creates a plain object from a SqlServerLsnPosition message. Also converts values to other types if specified. - * @param message SqlServerLsnPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SqlServerLsnPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlServerLsnPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlServerLsnPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleScnPosition. */ - interface IOracleScnPosition { - - /** OracleScnPosition scn */ - scn?: (number|Long|string|null); - } - - /** Represents an OracleScnPosition. */ - class OracleScnPosition implements IOracleScnPosition { - - /** - * Constructs a new OracleScnPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IOracleScnPosition); - - /** OracleScnPosition scn. */ - public scn: (number|Long|string); - - /** - * Creates a new OracleScnPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleScnPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.IOracleScnPosition): google.cloud.datastream.v1.OracleScnPosition; - - /** - * Encodes the specified OracleScnPosition message. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. - * @param message OracleScnPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IOracleScnPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleScnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. - * @param message OracleScnPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IOracleScnPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleScnPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleScnPosition - * @throws {Error} If the payload is not 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.datastream.v1.OracleScnPosition; - - /** - * Decodes an OracleScnPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleScnPosition - * @throws {Error} If the payload 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.datastream.v1.OracleScnPosition; - - /** - * Verifies an OracleScnPosition message. - * @param message Plain 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 OracleScnPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleScnPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleScnPosition; - - /** - * Creates a plain object from an OracleScnPosition message. Also converts values to other types if specified. - * @param message OracleScnPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.OracleScnPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleScnPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleScnPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlLogPosition. */ - interface IMysqlLogPosition { - - /** MysqlLogPosition logFile */ - logFile?: (string|null); - - /** MysqlLogPosition logPosition */ - logPosition?: (number|null); - } - - /** Represents a MysqlLogPosition. */ - class MysqlLogPosition implements IMysqlLogPosition { - - /** - * Constructs a new MysqlLogPosition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IMysqlLogPosition); - - /** MysqlLogPosition logFile. */ - public logFile: string; - - /** MysqlLogPosition logPosition. */ - public logPosition?: (number|null); - - /** MysqlLogPosition _logPosition. */ - public _logPosition?: "logPosition"; - - /** - * Creates a new MysqlLogPosition instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlLogPosition instance - */ - public static create(properties?: google.cloud.datastream.v1.IMysqlLogPosition): google.cloud.datastream.v1.MysqlLogPosition; - - /** - * Encodes the specified MysqlLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. - * @param message MysqlLogPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IMysqlLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. - * @param message MysqlLogPosition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlLogPosition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlLogPosition - * @throws {Error} If the payload is not 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.datastream.v1.MysqlLogPosition; - - /** - * Decodes a MysqlLogPosition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlLogPosition - * @throws {Error} If the payload 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.datastream.v1.MysqlLogPosition; - - /** - * Verifies a MysqlLogPosition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlLogPosition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlLogPosition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlLogPosition; - - /** - * Creates a plain object from a MysqlLogPosition message. Also converts values to other types if specified. - * @param message MysqlLogPosition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.MysqlLogPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlLogPosition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlLogPosition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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); - } - - /** 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[]; - - /** - * 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); - } - - /** 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); - - /** - * 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; - } - - /** 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); - } - - /** 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); - - /** - * 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 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** 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; - } - } - - /** 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_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 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 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); - } - - /** 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[]; - - /** - * 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); - } - - /** 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[]; - - /** - * 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 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 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 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 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 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); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|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|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|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); - } - - /** 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); - - /** - * 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 - } - } - - /** 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 features */ - features?: (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 features. */ - public features?: (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 - } - } - } - - /** 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 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 Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|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|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 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 longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations 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 Operations 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): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain 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 Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain 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 OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @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 a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not 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.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload 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.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @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-datastream/v1/protos/protos.js b/owl-bot-staging/google-cloud-datastream/v1/protos/protos.js deleted file mode 100644 index 9899a580e6b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/protos/protos.js +++ /dev/null @@ -1,54442 +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. - -/*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_datastream_protos || ($protobuf.roots._google_cloud_datastream_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.datastream = (function() { - - /** - * Namespace datastream. - * @memberof google.cloud - * @namespace - */ - var datastream = {}; - - datastream.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.datastream - * @namespace - */ - var v1 = {}; - - v1.Datastream = (function() { - - /** - * Constructs a new Datastream service. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Datastream - * @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 Datastream(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Datastream.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Datastream; - - /** - * Creates new Datastream service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datastream.v1.Datastream - * @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 {Datastream} RPC service. Useful where requests and/or responses are streamed. - */ - Datastream.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listConnectionProfiles}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef ListConnectionProfilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ListConnectionProfilesResponse} [response] ListConnectionProfilesResponse - */ - - /** - * Calls ListConnectionProfiles. - * @function listConnectionProfiles - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest} request ListConnectionProfilesRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.ListConnectionProfilesCallback} callback Node-style callback called with the error, if any, and ListConnectionProfilesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listConnectionProfiles = function listConnectionProfiles(request, callback) { - return this.rpcCall(listConnectionProfiles, $root.google.cloud.datastream.v1.ListConnectionProfilesRequest, $root.google.cloud.datastream.v1.ListConnectionProfilesResponse, request, callback); - }, "name", { value: "ListConnectionProfiles" }); - - /** - * Calls ListConnectionProfiles. - * @function listConnectionProfiles - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest} request ListConnectionProfilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getConnectionProfile}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef GetConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ConnectionProfile} [response] ConnectionProfile - */ - - /** - * Calls GetConnectionProfile. - * @function getConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest} request GetConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.GetConnectionProfileCallback} callback Node-style callback called with the error, if any, and ConnectionProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getConnectionProfile = function getConnectionProfile(request, callback) { - return this.rpcCall(getConnectionProfile, $root.google.cloud.datastream.v1.GetConnectionProfileRequest, $root.google.cloud.datastream.v1.ConnectionProfile, request, callback); - }, "name", { value: "GetConnectionProfile" }); - - /** - * Calls GetConnectionProfile. - * @function getConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest} request GetConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createConnectionProfile}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef CreateConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectionProfile. - * @function createConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest} request CreateConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.CreateConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createConnectionProfile = function createConnectionProfile(request, callback) { - return this.rpcCall(createConnectionProfile, $root.google.cloud.datastream.v1.CreateConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectionProfile" }); - - /** - * Calls CreateConnectionProfile. - * @function createConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest} request CreateConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|updateConnectionProfile}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef UpdateConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectionProfile. - * @function updateConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest} request UpdateConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.UpdateConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.updateConnectionProfile = function updateConnectionProfile(request, callback) { - return this.rpcCall(updateConnectionProfile, $root.google.cloud.datastream.v1.UpdateConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectionProfile" }); - - /** - * Calls UpdateConnectionProfile. - * @function updateConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest} request UpdateConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteConnectionProfile}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef DeleteConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectionProfile. - * @function deleteConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest} request DeleteConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.DeleteConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteConnectionProfile = function deleteConnectionProfile(request, callback) { - return this.rpcCall(deleteConnectionProfile, $root.google.cloud.datastream.v1.DeleteConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectionProfile" }); - - /** - * Calls DeleteConnectionProfile. - * @function deleteConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest} request DeleteConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|discoverConnectionProfile}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef DiscoverConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} [response] DiscoverConnectionProfileResponse - */ - - /** - * Calls DiscoverConnectionProfile. - * @function discoverConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest} request DiscoverConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.DiscoverConnectionProfileCallback} callback Node-style callback called with the error, if any, and DiscoverConnectionProfileResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.discoverConnectionProfile = function discoverConnectionProfile(request, callback) { - return this.rpcCall(discoverConnectionProfile, $root.google.cloud.datastream.v1.DiscoverConnectionProfileRequest, $root.google.cloud.datastream.v1.DiscoverConnectionProfileResponse, request, callback); - }, "name", { value: "DiscoverConnectionProfile" }); - - /** - * Calls DiscoverConnectionProfile. - * @function discoverConnectionProfile - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest} request DiscoverConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listStreams}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef ListStreamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ListStreamsResponse} [response] ListStreamsResponse - */ - - /** - * Calls ListStreams. - * @function listStreams - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListStreamsRequest} request ListStreamsRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.ListStreamsCallback} callback Node-style callback called with the error, if any, and ListStreamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listStreams = function listStreams(request, callback) { - return this.rpcCall(listStreams, $root.google.cloud.datastream.v1.ListStreamsRequest, $root.google.cloud.datastream.v1.ListStreamsResponse, request, callback); - }, "name", { value: "ListStreams" }); - - /** - * Calls ListStreams. - * @function listStreams - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListStreamsRequest} request ListStreamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStream}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef GetStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.Stream} [response] Stream - */ - - /** - * Calls GetStream. - * @function getStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetStreamRequest} request GetStreamRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.GetStreamCallback} callback Node-style callback called with the error, if any, and Stream - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getStream = function getStream(request, callback) { - return this.rpcCall(getStream, $root.google.cloud.datastream.v1.GetStreamRequest, $root.google.cloud.datastream.v1.Stream, request, callback); - }, "name", { value: "GetStream" }); - - /** - * Calls GetStream. - * @function getStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetStreamRequest} request GetStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createStream}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef CreateStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateStream. - * @function createStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateStreamRequest} request CreateStreamRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.CreateStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createStream = function createStream(request, callback) { - return this.rpcCall(createStream, $root.google.cloud.datastream.v1.CreateStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateStream" }); - - /** - * Calls CreateStream. - * @function createStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateStreamRequest} request CreateStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|updateStream}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef UpdateStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateStream. - * @function updateStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IUpdateStreamRequest} request UpdateStreamRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.UpdateStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.updateStream = function updateStream(request, callback) { - return this.rpcCall(updateStream, $root.google.cloud.datastream.v1.UpdateStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateStream" }); - - /** - * Calls UpdateStream. - * @function updateStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IUpdateStreamRequest} request UpdateStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteStream}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef DeleteStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteStream. - * @function deleteStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteStreamRequest} request DeleteStreamRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.DeleteStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteStream = function deleteStream(request, callback) { - return this.rpcCall(deleteStream, $root.google.cloud.datastream.v1.DeleteStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteStream" }); - - /** - * Calls DeleteStream. - * @function deleteStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteStreamRequest} request DeleteStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|runStream}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef RunStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RunStream. - * @function runStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IRunStreamRequest} request RunStreamRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.RunStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.runStream = function runStream(request, callback) { - return this.rpcCall(runStream, $root.google.cloud.datastream.v1.RunStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunStream" }); - - /** - * Calls RunStream. - * @function runStream - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IRunStreamRequest} request RunStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStreamObject}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef GetStreamObjectCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.StreamObject} [response] StreamObject - */ - - /** - * Calls GetStreamObject. - * @function getStreamObject - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest} request GetStreamObjectRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.GetStreamObjectCallback} callback Node-style callback called with the error, if any, and StreamObject - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getStreamObject = function getStreamObject(request, callback) { - return this.rpcCall(getStreamObject, $root.google.cloud.datastream.v1.GetStreamObjectRequest, $root.google.cloud.datastream.v1.StreamObject, request, callback); - }, "name", { value: "GetStreamObject" }); - - /** - * Calls GetStreamObject. - * @function getStreamObject - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest} request GetStreamObjectRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|lookupStreamObject}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef LookupStreamObjectCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.StreamObject} [response] StreamObject - */ - - /** - * Calls LookupStreamObject. - * @function lookupStreamObject - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest} request LookupStreamObjectRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.LookupStreamObjectCallback} callback Node-style callback called with the error, if any, and StreamObject - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.lookupStreamObject = function lookupStreamObject(request, callback) { - return this.rpcCall(lookupStreamObject, $root.google.cloud.datastream.v1.LookupStreamObjectRequest, $root.google.cloud.datastream.v1.StreamObject, request, callback); - }, "name", { value: "LookupStreamObject" }); - - /** - * Calls LookupStreamObject. - * @function lookupStreamObject - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest} request LookupStreamObjectRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listStreamObjects}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef ListStreamObjectsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ListStreamObjectsResponse} [response] ListStreamObjectsResponse - */ - - /** - * Calls ListStreamObjects. - * @function listStreamObjects - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest} request ListStreamObjectsRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.ListStreamObjectsCallback} callback Node-style callback called with the error, if any, and ListStreamObjectsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listStreamObjects = function listStreamObjects(request, callback) { - return this.rpcCall(listStreamObjects, $root.google.cloud.datastream.v1.ListStreamObjectsRequest, $root.google.cloud.datastream.v1.ListStreamObjectsResponse, request, callback); - }, "name", { value: "ListStreamObjects" }); - - /** - * Calls ListStreamObjects. - * @function listStreamObjects - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest} request ListStreamObjectsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|startBackfillJob}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef StartBackfillJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.StartBackfillJobResponse} [response] StartBackfillJobResponse - */ - - /** - * Calls StartBackfillJob. - * @function startBackfillJob - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest} request StartBackfillJobRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.StartBackfillJobCallback} callback Node-style callback called with the error, if any, and StartBackfillJobResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.startBackfillJob = function startBackfillJob(request, callback) { - return this.rpcCall(startBackfillJob, $root.google.cloud.datastream.v1.StartBackfillJobRequest, $root.google.cloud.datastream.v1.StartBackfillJobResponse, request, callback); - }, "name", { value: "StartBackfillJob" }); - - /** - * Calls StartBackfillJob. - * @function startBackfillJob - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest} request StartBackfillJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|stopBackfillJob}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef StopBackfillJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.StopBackfillJobResponse} [response] StopBackfillJobResponse - */ - - /** - * Calls StopBackfillJob. - * @function stopBackfillJob - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest} request StopBackfillJobRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.StopBackfillJobCallback} callback Node-style callback called with the error, if any, and StopBackfillJobResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.stopBackfillJob = function stopBackfillJob(request, callback) { - return this.rpcCall(stopBackfillJob, $root.google.cloud.datastream.v1.StopBackfillJobRequest, $root.google.cloud.datastream.v1.StopBackfillJobResponse, request, callback); - }, "name", { value: "StopBackfillJob" }); - - /** - * Calls StopBackfillJob. - * @function stopBackfillJob - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest} request StopBackfillJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|fetchStaticIps}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef FetchStaticIpsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.FetchStaticIpsResponse} [response] FetchStaticIpsResponse - */ - - /** - * Calls FetchStaticIps. - * @function fetchStaticIps - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.FetchStaticIpsCallback} callback Node-style callback called with the error, if any, and FetchStaticIpsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.fetchStaticIps = function fetchStaticIps(request, callback) { - return this.rpcCall(fetchStaticIps, $root.google.cloud.datastream.v1.FetchStaticIpsRequest, $root.google.cloud.datastream.v1.FetchStaticIpsResponse, request, callback); - }, "name", { value: "FetchStaticIps" }); - - /** - * Calls FetchStaticIps. - * @function fetchStaticIps - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createPrivateConnection}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef CreatePrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreatePrivateConnection. - * @function createPrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.CreatePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createPrivateConnection = function createPrivateConnection(request, callback) { - return this.rpcCall(createPrivateConnection, $root.google.cloud.datastream.v1.CreatePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreatePrivateConnection" }); - - /** - * Calls CreatePrivateConnection. - * @function createPrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getPrivateConnection}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef GetPrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.PrivateConnection} [response] PrivateConnection - */ - - /** - * Calls GetPrivateConnection. - * @function getPrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.GetPrivateConnectionCallback} callback Node-style callback called with the error, if any, and PrivateConnection - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getPrivateConnection = function getPrivateConnection(request, callback) { - return this.rpcCall(getPrivateConnection, $root.google.cloud.datastream.v1.GetPrivateConnectionRequest, $root.google.cloud.datastream.v1.PrivateConnection, request, callback); - }, "name", { value: "GetPrivateConnection" }); - - /** - * Calls GetPrivateConnection. - * @function getPrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listPrivateConnections}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef ListPrivateConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ListPrivateConnectionsResponse} [response] ListPrivateConnectionsResponse - */ - - /** - * Calls ListPrivateConnections. - * @function listPrivateConnections - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.ListPrivateConnectionsCallback} callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listPrivateConnections = function listPrivateConnections(request, callback) { - return this.rpcCall(listPrivateConnections, $root.google.cloud.datastream.v1.ListPrivateConnectionsRequest, $root.google.cloud.datastream.v1.ListPrivateConnectionsResponse, request, callback); - }, "name", { value: "ListPrivateConnections" }); - - /** - * Calls ListPrivateConnections. - * @function listPrivateConnections - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deletePrivateConnection}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef DeletePrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeletePrivateConnection. - * @function deletePrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.DeletePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deletePrivateConnection = function deletePrivateConnection(request, callback) { - return this.rpcCall(deletePrivateConnection, $root.google.cloud.datastream.v1.DeletePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeletePrivateConnection" }); - - /** - * Calls DeletePrivateConnection. - * @function deletePrivateConnection - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|createRoute}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef CreateRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateRoute. - * @function createRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateRouteRequest} request CreateRouteRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.CreateRouteCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createRoute = function createRoute(request, callback) { - return this.rpcCall(createRoute, $root.google.cloud.datastream.v1.CreateRouteRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRoute" }); - - /** - * Calls CreateRoute. - * @function createRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.ICreateRouteRequest} request CreateRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|getRoute}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef GetRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.Route} [response] Route - */ - - /** - * Calls GetRoute. - * @function getRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetRouteRequest} request GetRouteRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.GetRouteCallback} callback Node-style callback called with the error, if any, and Route - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getRoute = function getRoute(request, callback) { - return this.rpcCall(getRoute, $root.google.cloud.datastream.v1.GetRouteRequest, $root.google.cloud.datastream.v1.Route, request, callback); - }, "name", { value: "GetRoute" }); - - /** - * Calls GetRoute. - * @function getRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IGetRouteRequest} request GetRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|listRoutes}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef ListRoutesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1.ListRoutesResponse} [response] ListRoutesResponse - */ - - /** - * Calls ListRoutes. - * @function listRoutes - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListRoutesRequest} request ListRoutesRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.ListRoutesCallback} callback Node-style callback called with the error, if any, and ListRoutesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listRoutes = function listRoutes(request, callback) { - return this.rpcCall(listRoutes, $root.google.cloud.datastream.v1.ListRoutesRequest, $root.google.cloud.datastream.v1.ListRoutesResponse, request, callback); - }, "name", { value: "ListRoutes" }); - - /** - * Calls ListRoutes. - * @function listRoutes - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IListRoutesRequest} request ListRoutesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1.Datastream|deleteRoute}. - * @memberof google.cloud.datastream.v1.Datastream - * @typedef DeleteRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteRoute. - * @function deleteRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteRouteRequest} request DeleteRouteRequest message or plain object - * @param {google.cloud.datastream.v1.Datastream.DeleteRouteCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteRoute = function deleteRoute(request, callback) { - return this.rpcCall(deleteRoute, $root.google.cloud.datastream.v1.DeleteRouteRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteRoute" }); - - /** - * Calls DeleteRoute. - * @function deleteRoute - * @memberof google.cloud.datastream.v1.Datastream - * @instance - * @param {google.cloud.datastream.v1.IDeleteRouteRequest} request DeleteRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Datastream; - })(); - - v1.DiscoverConnectionProfileRequest = (function() { - - /** - * Properties of a DiscoverConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @interface IDiscoverConnectionProfileRequest - * @property {string|null} [parent] DiscoverConnectionProfileRequest parent - * @property {google.cloud.datastream.v1.IConnectionProfile|null} [connectionProfile] DiscoverConnectionProfileRequest connectionProfile - * @property {string|null} [connectionProfileName] DiscoverConnectionProfileRequest connectionProfileName - * @property {boolean|null} [fullHierarchy] DiscoverConnectionProfileRequest fullHierarchy - * @property {number|null} [hierarchyDepth] DiscoverConnectionProfileRequest hierarchyDepth - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileRequest oracleRdbms - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileRequest mysqlRdbms - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlRdbms] DiscoverConnectionProfileRequest postgresqlRdbms - * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerRdbms] DiscoverConnectionProfileRequest sqlServerRdbms - */ - - /** - * Constructs a new DiscoverConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DiscoverConnectionProfileRequest. - * @implements IDiscoverConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest=} [properties] Properties to set - */ - function DiscoverConnectionProfileRequest(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]]; - } - - /** - * DiscoverConnectionProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.parent = ""; - - /** - * DiscoverConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * DiscoverConnectionProfileRequest connectionProfileName. - * @member {string|null|undefined} connectionProfileName - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.connectionProfileName = null; - - /** - * DiscoverConnectionProfileRequest fullHierarchy. - * @member {boolean|null|undefined} fullHierarchy - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.fullHierarchy = null; - - /** - * DiscoverConnectionProfileRequest hierarchyDepth. - * @member {number|null|undefined} hierarchyDepth - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.hierarchyDepth = null; - - /** - * DiscoverConnectionProfileRequest oracleRdbms. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} oracleRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.oracleRdbms = null; - - /** - * DiscoverConnectionProfileRequest mysqlRdbms. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} mysqlRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.mysqlRdbms = null; - - /** - * DiscoverConnectionProfileRequest postgresqlRdbms. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} postgresqlRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.postgresqlRdbms = null; - - /** - * DiscoverConnectionProfileRequest sqlServerRdbms. - * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.sqlServerRdbms = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverConnectionProfileRequest target. - * @member {"connectionProfile"|"connectionProfileName"|undefined} target - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["connectionProfile", "connectionProfileName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DiscoverConnectionProfileRequest hierarchy. - * @member {"fullHierarchy"|"hierarchyDepth"|undefined} hierarchy - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "hierarchy", { - get: $util.oneOfGetter($oneOfFields = ["fullHierarchy", "hierarchyDepth"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DiscoverConnectionProfileRequest dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"|undefined} dataObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms", "sqlServerRdbms"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest instance - */ - DiscoverConnectionProfileRequest.create = function create(properties) { - return new DiscoverConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileRequest.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.fullHierarchy != null && Object.hasOwnProperty.call(message, "fullHierarchy")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.fullHierarchy); - if (message.hierarchyDepth != null && Object.hasOwnProperty.call(message, "hierarchyDepth")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hierarchyDepth); - if (message.oracleRdbms != null && Object.hasOwnProperty.call(message, "oracleRdbms")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.oracleRdbms, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlRdbms != null && Object.hasOwnProperty.call(message, "mysqlRdbms")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.postgresqlRdbms != null && Object.hasOwnProperty.call(message, "postgresqlRdbms")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlRdbms, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.sqlServerRdbms != null && Object.hasOwnProperty.call(message, "sqlServerRdbms")) - $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerRdbms, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.connectionProfileName != null && Object.hasOwnProperty.call(message, "connectionProfileName")) - writer.uint32(/* id 201, wireType 2 =*/1610).string(message.connectionProfileName); - return writer; - }; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DiscoverConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 200: { - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 201: { - message.connectionProfileName = reader.string(); - break; - } - case 3: { - message.fullHierarchy = reader.bool(); - break; - } - case 4: { - message.hierarchyDepth = reader.int32(); - break; - } - case 100: { - message.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 102: { - message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 103: { - message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverConnectionProfileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - properties.target = 1; - { - var error = $root.google.cloud.datastream.v1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - } - if (message.connectionProfileName != null && message.hasOwnProperty("connectionProfileName")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.connectionProfileName)) - return "connectionProfileName: string expected"; - } - if (message.fullHierarchy != null && message.hasOwnProperty("fullHierarchy")) { - properties.hierarchy = 1; - if (typeof message.fullHierarchy !== "boolean") - return "fullHierarchy: boolean expected"; - } - if (message.hierarchyDepth != null && message.hasOwnProperty("hierarchyDepth")) { - if (properties.hierarchy === 1) - return "hierarchy: multiple values"; - properties.hierarchy = 1; - if (!$util.isInteger(message.hierarchyDepth)) - return "hierarchyDepth: integer expected"; - } - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.oracleRdbms); - if (error) - return "oracleRdbms." + error; - } - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.mysqlRdbms); - if (error) - return "mysqlRdbms." + error; - } - } - if (message.postgresqlRdbms != null && message.hasOwnProperty("postgresqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.postgresqlRdbms); - if (error) - return "postgresqlRdbms." + error; - } - } - if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerRdbms); - if (error) - return "sqlServerRdbms." + error; - } - } - return null; - }; - - /** - * Creates a DiscoverConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - */ - DiscoverConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DiscoverConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1.DiscoverConnectionProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.connectionProfileName != null) - message.connectionProfileName = String(object.connectionProfileName); - if (object.fullHierarchy != null) - message.fullHierarchy = Boolean(object.fullHierarchy); - if (object.hierarchyDepth != null) - message.hierarchyDepth = object.hierarchyDepth | 0; - if (object.oracleRdbms != null) { - if (typeof object.oracleRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.oracleRdbms: object expected"); - message.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.oracleRdbms); - } - if (object.mysqlRdbms != null) { - if (typeof object.mysqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.mysqlRdbms: object expected"); - message.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.mysqlRdbms); - } - if (object.postgresqlRdbms != null) { - if (typeof object.postgresqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.postgresqlRdbms: object expected"); - message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlRdbms); - } - if (object.sqlServerRdbms != null) { - if (typeof object.sqlServerRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.sqlServerRdbms: object expected"); - message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerRdbms); - } - return message; - }; - - /** - * Creates a plain object from a DiscoverConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.DiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.fullHierarchy != null && message.hasOwnProperty("fullHierarchy")) { - object.fullHierarchy = message.fullHierarchy; - if (options.oneofs) - object.hierarchy = "fullHierarchy"; - } - if (message.hierarchyDepth != null && message.hasOwnProperty("hierarchyDepth")) { - object.hierarchyDepth = message.hierarchyDepth; - if (options.oneofs) - object.hierarchy = "hierarchyDepth"; - } - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - object.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.oracleRdbms, options); - if (options.oneofs) - object.dataObject = "oracleRdbms"; - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - object.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.mysqlRdbms, options); - if (options.oneofs) - object.dataObject = "mysqlRdbms"; - } - if (message.postgresqlRdbms != null && message.hasOwnProperty("postgresqlRdbms")) { - object.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.postgresqlRdbms, options); - if (options.oneofs) - object.dataObject = "postgresqlRdbms"; - } - if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { - object.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerRdbms, options); - if (options.oneofs) - object.dataObject = "sqlServerRdbms"; - } - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - object.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.toObject(message.connectionProfile, options); - if (options.oneofs) - object.target = "connectionProfile"; - } - if (message.connectionProfileName != null && message.hasOwnProperty("connectionProfileName")) { - object.connectionProfileName = message.connectionProfileName; - if (options.oneofs) - object.target = "connectionProfileName"; - } - return object; - }; - - /** - * Converts this DiscoverConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - DiscoverConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DiscoverConnectionProfileRequest"; - }; - - return DiscoverConnectionProfileRequest; - })(); - - v1.DiscoverConnectionProfileResponse = (function() { - - /** - * Properties of a DiscoverConnectionProfileResponse. - * @memberof google.cloud.datastream.v1 - * @interface IDiscoverConnectionProfileResponse - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileResponse oracleRdbms - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileResponse mysqlRdbms - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlRdbms] DiscoverConnectionProfileResponse postgresqlRdbms - * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerRdbms] DiscoverConnectionProfileResponse sqlServerRdbms - */ - - /** - * Constructs a new DiscoverConnectionProfileResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DiscoverConnectionProfileResponse. - * @implements IDiscoverConnectionProfileResponse - * @constructor - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileResponse=} [properties] Properties to set - */ - function DiscoverConnectionProfileResponse(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]]; - } - - /** - * DiscoverConnectionProfileResponse oracleRdbms. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} oracleRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.oracleRdbms = null; - - /** - * DiscoverConnectionProfileResponse mysqlRdbms. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} mysqlRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.mysqlRdbms = null; - - /** - * DiscoverConnectionProfileResponse postgresqlRdbms. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} postgresqlRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.postgresqlRdbms = null; - - /** - * DiscoverConnectionProfileResponse sqlServerRdbms. - * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerRdbms - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.sqlServerRdbms = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverConnectionProfileResponse dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"|undefined} dataObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileResponse.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms", "sqlServerRdbms"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverConnectionProfileResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse instance - */ - DiscoverConnectionProfileResponse.create = function create(properties) { - return new DiscoverConnectionProfileResponse(properties); - }; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleRdbms != null && Object.hasOwnProperty.call(message, "oracleRdbms")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.oracleRdbms, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlRdbms != null && Object.hasOwnProperty.call(message, "mysqlRdbms")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.postgresqlRdbms != null && Object.hasOwnProperty.call(message, "postgresqlRdbms")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlRdbms, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.sqlServerRdbms != null && Object.hasOwnProperty.call(message, "sqlServerRdbms")) - $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerRdbms, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1.IDiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DiscoverConnectionProfileResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 102: { - message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 103: { - message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverConnectionProfileResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverConnectionProfileResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.oracleRdbms); - if (error) - return "oracleRdbms." + error; - } - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.mysqlRdbms); - if (error) - return "mysqlRdbms." + error; - } - } - if (message.postgresqlRdbms != null && message.hasOwnProperty("postgresqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.postgresqlRdbms); - if (error) - return "postgresqlRdbms." + error; - } - } - if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerRdbms); - if (error) - return "sqlServerRdbms." + error; - } - } - return null; - }; - - /** - * Creates a DiscoverConnectionProfileResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - */ - DiscoverConnectionProfileResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DiscoverConnectionProfileResponse) - return object; - var message = new $root.google.cloud.datastream.v1.DiscoverConnectionProfileResponse(); - if (object.oracleRdbms != null) { - if (typeof object.oracleRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.oracleRdbms: object expected"); - message.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.oracleRdbms); - } - if (object.mysqlRdbms != null) { - if (typeof object.mysqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.mysqlRdbms: object expected"); - message.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.mysqlRdbms); - } - if (object.postgresqlRdbms != null) { - if (typeof object.postgresqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.postgresqlRdbms: object expected"); - message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlRdbms); - } - if (object.sqlServerRdbms != null) { - if (typeof object.sqlServerRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.sqlServerRdbms: object expected"); - message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerRdbms); - } - return message; - }; - - /** - * Creates a plain object from a DiscoverConnectionProfileResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1.DiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverConnectionProfileResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - object.oracleRdbms = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.oracleRdbms, options); - if (options.oneofs) - object.dataObject = "oracleRdbms"; - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - object.mysqlRdbms = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.mysqlRdbms, options); - if (options.oneofs) - object.dataObject = "mysqlRdbms"; - } - if (message.postgresqlRdbms != null && message.hasOwnProperty("postgresqlRdbms")) { - object.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.postgresqlRdbms, options); - if (options.oneofs) - object.dataObject = "postgresqlRdbms"; - } - if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { - object.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerRdbms, options); - if (options.oneofs) - object.dataObject = "sqlServerRdbms"; - } - return object; - }; - - /** - * Converts this DiscoverConnectionProfileResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @instance - * @returns {Object.} JSON object - */ - DiscoverConnectionProfileResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverConnectionProfileResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverConnectionProfileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DiscoverConnectionProfileResponse"; - }; - - return DiscoverConnectionProfileResponse; - })(); - - v1.FetchStaticIpsRequest = (function() { - - /** - * Properties of a FetchStaticIpsRequest. - * @memberof google.cloud.datastream.v1 - * @interface IFetchStaticIpsRequest - * @property {string|null} [name] FetchStaticIpsRequest name - * @property {number|null} [pageSize] FetchStaticIpsRequest pageSize - * @property {string|null} [pageToken] FetchStaticIpsRequest pageToken - */ - - /** - * Constructs a new FetchStaticIpsRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a FetchStaticIpsRequest. - * @implements IFetchStaticIpsRequest - * @constructor - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest=} [properties] Properties to set - */ - function FetchStaticIpsRequest(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]]; - } - - /** - * FetchStaticIpsRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.name = ""; - - /** - * FetchStaticIpsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.pageSize = 0; - - /** - * FetchStaticIpsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.pageToken = ""; - - /** - * Creates a new FetchStaticIpsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.FetchStaticIpsRequest} FetchStaticIpsRequest instance - */ - FetchStaticIpsRequest.create = function create(properties) { - return new FetchStaticIpsRequest(properties); - }; - - /** - * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.FetchStaticIpsRequest} FetchStaticIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.FetchStaticIpsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.FetchStaticIpsRequest} FetchStaticIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchStaticIpsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchStaticIpsRequest.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.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 FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.FetchStaticIpsRequest} FetchStaticIpsRequest - */ - FetchStaticIpsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.FetchStaticIpsRequest) - return object; - var message = new $root.google.cloud.datastream.v1.FetchStaticIpsRequest(); - if (object.name != null) - message.name = String(object.name); - 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 FetchStaticIpsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1.FetchStaticIpsRequest} message FetchStaticIpsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchStaticIpsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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 FetchStaticIpsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchStaticIpsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchStaticIpsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.FetchStaticIpsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchStaticIpsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.FetchStaticIpsRequest"; - }; - - return FetchStaticIpsRequest; - })(); - - v1.FetchStaticIpsResponse = (function() { - - /** - * Properties of a FetchStaticIpsResponse. - * @memberof google.cloud.datastream.v1 - * @interface IFetchStaticIpsResponse - * @property {Array.|null} [staticIps] FetchStaticIpsResponse staticIps - * @property {string|null} [nextPageToken] FetchStaticIpsResponse nextPageToken - */ - - /** - * Constructs a new FetchStaticIpsResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a FetchStaticIpsResponse. - * @implements IFetchStaticIpsResponse - * @constructor - * @param {google.cloud.datastream.v1.IFetchStaticIpsResponse=} [properties] Properties to set - */ - function FetchStaticIpsResponse(properties) { - this.staticIps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchStaticIpsResponse staticIps. - * @member {Array.} staticIps - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @instance - */ - FetchStaticIpsResponse.prototype.staticIps = $util.emptyArray; - - /** - * FetchStaticIpsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @instance - */ - FetchStaticIpsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new FetchStaticIpsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.FetchStaticIpsResponse} FetchStaticIpsResponse instance - */ - FetchStaticIpsResponse.create = function create(properties) { - return new FetchStaticIpsResponse(properties); - }; - - /** - * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.staticIps != null && message.staticIps.length) - for (var i = 0; i < message.staticIps.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.staticIps[i]); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.FetchStaticIpsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.FetchStaticIpsResponse} FetchStaticIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.FetchStaticIpsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.staticIps && message.staticIps.length)) - message.staticIps = []; - message.staticIps.push(reader.string()); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.FetchStaticIpsResponse} FetchStaticIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchStaticIpsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchStaticIpsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.staticIps != null && message.hasOwnProperty("staticIps")) { - if (!Array.isArray(message.staticIps)) - return "staticIps: array expected"; - for (var i = 0; i < message.staticIps.length; ++i) - if (!$util.isString(message.staticIps[i])) - return "staticIps: string[] expected"; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.FetchStaticIpsResponse} FetchStaticIpsResponse - */ - FetchStaticIpsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.FetchStaticIpsResponse) - return object; - var message = new $root.google.cloud.datastream.v1.FetchStaticIpsResponse(); - if (object.staticIps) { - if (!Array.isArray(object.staticIps)) - throw TypeError(".google.cloud.datastream.v1.FetchStaticIpsResponse.staticIps: array expected"); - message.staticIps = []; - for (var i = 0; i < object.staticIps.length; ++i) - message.staticIps[i] = String(object.staticIps[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1.FetchStaticIpsResponse} message FetchStaticIpsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchStaticIpsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.staticIps = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.staticIps && message.staticIps.length) { - object.staticIps = []; - for (var j = 0; j < message.staticIps.length; ++j) - object.staticIps[j] = message.staticIps[j]; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this FetchStaticIpsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchStaticIpsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchStaticIpsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.FetchStaticIpsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchStaticIpsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.FetchStaticIpsResponse"; - }; - - return FetchStaticIpsResponse; - })(); - - v1.ListConnectionProfilesRequest = (function() { - - /** - * Properties of a ListConnectionProfilesRequest. - * @memberof google.cloud.datastream.v1 - * @interface IListConnectionProfilesRequest - * @property {string|null} [parent] ListConnectionProfilesRequest parent - * @property {number|null} [pageSize] ListConnectionProfilesRequest pageSize - * @property {string|null} [pageToken] ListConnectionProfilesRequest pageToken - * @property {string|null} [filter] ListConnectionProfilesRequest filter - * @property {string|null} [orderBy] ListConnectionProfilesRequest orderBy - */ - - /** - * Constructs a new ListConnectionProfilesRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListConnectionProfilesRequest. - * @implements IListConnectionProfilesRequest - * @constructor - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest=} [properties] Properties to set - */ - function ListConnectionProfilesRequest(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]]; - } - - /** - * ListConnectionProfilesRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.parent = ""; - - /** - * ListConnectionProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.pageSize = 0; - - /** - * ListConnectionProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.pageToken = ""; - - /** - * ListConnectionProfilesRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.filter = ""; - - /** - * ListConnectionProfilesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectionProfilesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest instance - */ - ListConnectionProfilesRequest.create = function create(properties) { - return new ListConnectionProfilesRequest(properties); - }; - - /** - * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListConnectionProfilesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectionProfilesRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectionProfilesRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - */ - ListConnectionProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListConnectionProfilesRequest) - return object; - var message = new $root.google.cloud.datastream.v1.ListConnectionProfilesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1.ListConnectionProfilesRequest} message ListConnectionProfilesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectionProfilesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListConnectionProfilesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectionProfilesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectionProfilesRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListConnectionProfilesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectionProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListConnectionProfilesRequest"; - }; - - return ListConnectionProfilesRequest; - })(); - - v1.ListConnectionProfilesResponse = (function() { - - /** - * Properties of a ListConnectionProfilesResponse. - * @memberof google.cloud.datastream.v1 - * @interface IListConnectionProfilesResponse - * @property {Array.|null} [connectionProfiles] ListConnectionProfilesResponse connectionProfiles - * @property {string|null} [nextPageToken] ListConnectionProfilesResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectionProfilesResponse unreachable - */ - - /** - * Constructs a new ListConnectionProfilesResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListConnectionProfilesResponse. - * @implements IListConnectionProfilesResponse - * @constructor - * @param {google.cloud.datastream.v1.IListConnectionProfilesResponse=} [properties] Properties to set - */ - function ListConnectionProfilesResponse(properties) { - this.connectionProfiles = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectionProfilesResponse connectionProfiles. - * @member {Array.} connectionProfiles - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.connectionProfiles = $util.emptyArray; - - /** - * ListConnectionProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.nextPageToken = ""; - - /** - * ListConnectionProfilesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectionProfilesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse instance - */ - ListConnectionProfilesResponse.create = function create(properties) { - return new ListConnectionProfilesResponse(properties); - }; - - /** - * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionProfiles != null && message.connectionProfiles.length) - for (var i = 0; i < message.connectionProfiles.length; ++i) - $root.google.cloud.datastream.v1.ConnectionProfile.encode(message.connectionProfiles[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListConnectionProfilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListConnectionProfilesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.connectionProfiles && message.connectionProfiles.length)) - message.connectionProfiles = []; - message.connectionProfiles.push($root.google.cloud.datastream.v1.ConnectionProfile.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectionProfilesResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectionProfilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionProfiles != null && message.hasOwnProperty("connectionProfiles")) { - if (!Array.isArray(message.connectionProfiles)) - return "connectionProfiles: array expected"; - for (var i = 0; i < message.connectionProfiles.length; ++i) { - var error = $root.google.cloud.datastream.v1.ConnectionProfile.verify(message.connectionProfiles[i]); - if (error) - return "connectionProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - */ - ListConnectionProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListConnectionProfilesResponse) - return object; - var message = new $root.google.cloud.datastream.v1.ListConnectionProfilesResponse(); - if (object.connectionProfiles) { - if (!Array.isArray(object.connectionProfiles)) - throw TypeError(".google.cloud.datastream.v1.ListConnectionProfilesResponse.connectionProfiles: array expected"); - message.connectionProfiles = []; - for (var i = 0; i < object.connectionProfiles.length; ++i) { - if (typeof object.connectionProfiles[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ListConnectionProfilesResponse.connectionProfiles: object expected"); - message.connectionProfiles[i] = $root.google.cloud.datastream.v1.ConnectionProfile.fromObject(object.connectionProfiles[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1.ListConnectionProfilesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1.ListConnectionProfilesResponse} message ListConnectionProfilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectionProfilesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.connectionProfiles = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.connectionProfiles && message.connectionProfiles.length) { - object.connectionProfiles = []; - for (var j = 0; j < message.connectionProfiles.length; ++j) - object.connectionProfiles[j] = $root.google.cloud.datastream.v1.ConnectionProfile.toObject(message.connectionProfiles[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListConnectionProfilesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectionProfilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectionProfilesResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListConnectionProfilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectionProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListConnectionProfilesResponse"; - }; - - return ListConnectionProfilesResponse; - })(); - - v1.GetConnectionProfileRequest = (function() { - - /** - * Properties of a GetConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @interface IGetConnectionProfileRequest - * @property {string|null} [name] GetConnectionProfileRequest name - */ - - /** - * Constructs a new GetConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GetConnectionProfileRequest. - * @implements IGetConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest=} [properties] Properties to set - */ - function GetConnectionProfileRequest(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]]; - } - - /** - * GetConnectionProfileRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @instance - */ - GetConnectionProfileRequest.prototype.name = ""; - - /** - * Creates a new GetConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GetConnectionProfileRequest} GetConnectionProfileRequest instance - */ - GetConnectionProfileRequest.create = function create(properties) { - return new GetConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GetConnectionProfileRequest} GetConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GetConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GetConnectionProfileRequest} GetConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GetConnectionProfileRequest} GetConnectionProfileRequest - */ - GetConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GetConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1.GetConnectionProfileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.GetConnectionProfileRequest} message GetConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GetConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GetConnectionProfileRequest"; - }; - - return GetConnectionProfileRequest; - })(); - - v1.CreateConnectionProfileRequest = (function() { - - /** - * Properties of a CreateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @interface ICreateConnectionProfileRequest - * @property {string|null} [parent] CreateConnectionProfileRequest parent - * @property {string|null} [connectionProfileId] CreateConnectionProfileRequest connectionProfileId - * @property {google.cloud.datastream.v1.IConnectionProfile|null} [connectionProfile] CreateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] CreateConnectionProfileRequest requestId - * @property {boolean|null} [validateOnly] CreateConnectionProfileRequest validateOnly - * @property {boolean|null} [force] CreateConnectionProfileRequest force - */ - - /** - * Constructs a new CreateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a CreateConnectionProfileRequest. - * @implements ICreateConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest=} [properties] Properties to set - */ - function CreateConnectionProfileRequest(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]]; - } - - /** - * CreateConnectionProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.parent = ""; - - /** - * CreateConnectionProfileRequest connectionProfileId. - * @member {string} connectionProfileId - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.connectionProfileId = ""; - - /** - * CreateConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * CreateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.requestId = ""; - - /** - * CreateConnectionProfileRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.validateOnly = false; - - /** - * CreateConnectionProfileRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.force = false; - - /** - * Creates a new CreateConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest instance - */ - CreateConnectionProfileRequest.create = function create(properties) { - return new CreateConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectionProfileRequest.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.connectionProfileId != null && Object.hasOwnProperty.call(message, "connectionProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionProfileId); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); - return writer; - }; - - /** - * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CreateConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.connectionProfileId = reader.string(); - break; - } - case 3: { - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectionProfileRequest.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.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - if (!$util.isString(message.connectionProfileId)) - return "connectionProfileId: string expected"; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.datastream.v1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - */ - CreateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CreateConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1.CreateConnectionProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.connectionProfileId != null) - message.connectionProfileId = String(object.connectionProfileId); - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.CreateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.CreateConnectionProfileRequest} message CreateConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.connectionProfileId = ""; - object.connectionProfile = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - object.connectionProfileId = message.connectionProfileId; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this CreateConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CreateConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CreateConnectionProfileRequest"; - }; - - return CreateConnectionProfileRequest; - })(); - - v1.UpdateConnectionProfileRequest = (function() { - - /** - * Properties of an UpdateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @interface IUpdateConnectionProfileRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionProfileRequest updateMask - * @property {google.cloud.datastream.v1.IConnectionProfile|null} [connectionProfile] UpdateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] UpdateConnectionProfileRequest requestId - * @property {boolean|null} [validateOnly] UpdateConnectionProfileRequest validateOnly - * @property {boolean|null} [force] UpdateConnectionProfileRequest force - */ - - /** - * Constructs a new UpdateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an UpdateConnectionProfileRequest. - * @implements IUpdateConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set - */ - function UpdateConnectionProfileRequest(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]]; - } - - /** - * UpdateConnectionProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.updateMask = null; - - /** - * UpdateConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * UpdateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.requestId = ""; - - /** - * UpdateConnectionProfileRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.validateOnly = false; - - /** - * UpdateConnectionProfileRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.force = false; - - /** - * Creates a new UpdateConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest instance - */ - UpdateConnectionProfileRequest.create = function create(properties) { - return new UpdateConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.UpdateConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectionProfileRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; - - /** - * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.UpdateConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.UpdateConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectionProfileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.datastream.v1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates an UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - */ - UpdateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.UpdateConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1.UpdateConnectionProfileRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datastream.v1.UpdateConnectionProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.UpdateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.UpdateConnectionProfileRequest} message UpdateConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.connectionProfile = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this UpdateConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.UpdateConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.UpdateConnectionProfileRequest"; - }; - - return UpdateConnectionProfileRequest; - })(); - - v1.DeleteConnectionProfileRequest = (function() { - - /** - * Properties of a DeleteConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @interface IDeleteConnectionProfileRequest - * @property {string|null} [name] DeleteConnectionProfileRequest name - * @property {string|null} [requestId] DeleteConnectionProfileRequest requestId - */ - - /** - * Constructs a new DeleteConnectionProfileRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DeleteConnectionProfileRequest. - * @implements IDeleteConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set - */ - function DeleteConnectionProfileRequest(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]]; - } - - /** - * DeleteConnectionProfileRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.name = ""; - - /** - * DeleteConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest instance - */ - DeleteConnectionProfileRequest.create = function create(properties) { - return new DeleteConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectionProfileRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DeleteConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectionProfileRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - */ - DeleteConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DeleteConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1.DeleteConnectionProfileRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1.DeleteConnectionProfileRequest} message DeleteConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DeleteConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DeleteConnectionProfileRequest"; - }; - - return DeleteConnectionProfileRequest; - })(); - - v1.ListStreamsRequest = (function() { - - /** - * Properties of a ListStreamsRequest. - * @memberof google.cloud.datastream.v1 - * @interface IListStreamsRequest - * @property {string|null} [parent] ListStreamsRequest parent - * @property {number|null} [pageSize] ListStreamsRequest pageSize - * @property {string|null} [pageToken] ListStreamsRequest pageToken - * @property {string|null} [filter] ListStreamsRequest filter - * @property {string|null} [orderBy] ListStreamsRequest orderBy - */ - - /** - * Constructs a new ListStreamsRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListStreamsRequest. - * @implements IListStreamsRequest - * @constructor - * @param {google.cloud.datastream.v1.IListStreamsRequest=} [properties] Properties to set - */ - function ListStreamsRequest(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]]; - } - - /** - * ListStreamsRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.parent = ""; - - /** - * ListStreamsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.pageSize = 0; - - /** - * ListStreamsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.pageToken = ""; - - /** - * ListStreamsRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.filter = ""; - - /** - * ListStreamsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListStreamsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListStreamsRequest} ListStreamsRequest instance - */ - ListStreamsRequest.create = function create(properties) { - return new ListStreamsRequest(properties); - }; - - /** - * Encodes the specified ListStreamsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamsRequest} message ListStreamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListStreamsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamsRequest} message ListStreamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListStreamsRequest} ListStreamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListStreamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListStreamsRequest} ListStreamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamsRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListStreamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListStreamsRequest} ListStreamsRequest - */ - ListStreamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListStreamsRequest) - return object; - var message = new $root.google.cloud.datastream.v1.ListStreamsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListStreamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1.ListStreamsRequest} message ListStreamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListStreamsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @instance - * @returns {Object.} JSON object - */ - ListStreamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListStreamsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListStreamsRequest"; - }; - - return ListStreamsRequest; - })(); - - v1.ListStreamsResponse = (function() { - - /** - * Properties of a ListStreamsResponse. - * @memberof google.cloud.datastream.v1 - * @interface IListStreamsResponse - * @property {Array.|null} [streams] ListStreamsResponse streams - * @property {string|null} [nextPageToken] ListStreamsResponse nextPageToken - * @property {Array.|null} [unreachable] ListStreamsResponse unreachable - */ - - /** - * Constructs a new ListStreamsResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListStreamsResponse. - * @implements IListStreamsResponse - * @constructor - * @param {google.cloud.datastream.v1.IListStreamsResponse=} [properties] Properties to set - */ - function ListStreamsResponse(properties) { - this.streams = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListStreamsResponse streams. - * @member {Array.} streams - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.streams = $util.emptyArray; - - /** - * ListStreamsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.nextPageToken = ""; - - /** - * ListStreamsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListStreamsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListStreamsResponse} ListStreamsResponse instance - */ - ListStreamsResponse.create = function create(properties) { - return new ListStreamsResponse(properties); - }; - - /** - * Encodes the specified ListStreamsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamsResponse} message ListStreamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.streams != null && message.streams.length) - for (var i = 0; i < message.streams.length; ++i) - $root.google.cloud.datastream.v1.Stream.encode(message.streams[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListStreamsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamsResponse} message ListStreamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListStreamsResponse} ListStreamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListStreamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.streams && message.streams.length)) - message.streams = []; - message.streams.push($root.google.cloud.datastream.v1.Stream.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListStreamsResponse} ListStreamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.streams != null && message.hasOwnProperty("streams")) { - if (!Array.isArray(message.streams)) - return "streams: array expected"; - for (var i = 0; i < message.streams.length; ++i) { - var error = $root.google.cloud.datastream.v1.Stream.verify(message.streams[i]); - if (error) - return "streams." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListStreamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListStreamsResponse} ListStreamsResponse - */ - ListStreamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListStreamsResponse) - return object; - var message = new $root.google.cloud.datastream.v1.ListStreamsResponse(); - if (object.streams) { - if (!Array.isArray(object.streams)) - throw TypeError(".google.cloud.datastream.v1.ListStreamsResponse.streams: array expected"); - message.streams = []; - for (var i = 0; i < object.streams.length; ++i) { - if (typeof object.streams[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ListStreamsResponse.streams: object expected"); - message.streams[i] = $root.google.cloud.datastream.v1.Stream.fromObject(object.streams[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1.ListStreamsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListStreamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1.ListStreamsResponse} message ListStreamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.streams = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.streams && message.streams.length) { - object.streams = []; - for (var j = 0; j < message.streams.length; ++j) - object.streams[j] = $root.google.cloud.datastream.v1.Stream.toObject(message.streams[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListStreamsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @instance - * @returns {Object.} JSON object - */ - ListStreamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListStreamsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListStreamsResponse"; - }; - - return ListStreamsResponse; - })(); - - v1.GetStreamRequest = (function() { - - /** - * Properties of a GetStreamRequest. - * @memberof google.cloud.datastream.v1 - * @interface IGetStreamRequest - * @property {string|null} [name] GetStreamRequest name - */ - - /** - * Constructs a new GetStreamRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GetStreamRequest. - * @implements IGetStreamRequest - * @constructor - * @param {google.cloud.datastream.v1.IGetStreamRequest=} [properties] Properties to set - */ - function GetStreamRequest(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]]; - } - - /** - * GetStreamRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @instance - */ - GetStreamRequest.prototype.name = ""; - - /** - * Creates a new GetStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GetStreamRequest} GetStreamRequest instance - */ - GetStreamRequest.create = function create(properties) { - return new GetStreamRequest(properties); - }; - - /** - * Encodes the specified GetStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamRequest} message GetStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamRequest.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 GetStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamRequest} message GetStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GetStreamRequest} GetStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GetStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GetStreamRequest} GetStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetStreamRequest.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 GetStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GetStreamRequest} GetStreamRequest - */ - GetStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GetStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1.GetStreamRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1.GetStreamRequest} message GetStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetStreamRequest.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 GetStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @instance - * @returns {Object.} JSON object - */ - GetStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GetStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GetStreamRequest"; - }; - - return GetStreamRequest; - })(); - - v1.CreateStreamRequest = (function() { - - /** - * Properties of a CreateStreamRequest. - * @memberof google.cloud.datastream.v1 - * @interface ICreateStreamRequest - * @property {string|null} [parent] CreateStreamRequest parent - * @property {string|null} [streamId] CreateStreamRequest streamId - * @property {google.cloud.datastream.v1.IStream|null} [stream] CreateStreamRequest stream - * @property {string|null} [requestId] CreateStreamRequest requestId - * @property {boolean|null} [validateOnly] CreateStreamRequest validateOnly - * @property {boolean|null} [force] CreateStreamRequest force - */ - - /** - * Constructs a new CreateStreamRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a CreateStreamRequest. - * @implements ICreateStreamRequest - * @constructor - * @param {google.cloud.datastream.v1.ICreateStreamRequest=} [properties] Properties to set - */ - function CreateStreamRequest(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]]; - } - - /** - * CreateStreamRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.parent = ""; - - /** - * CreateStreamRequest streamId. - * @member {string} streamId - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.streamId = ""; - - /** - * CreateStreamRequest stream. - * @member {google.cloud.datastream.v1.IStream|null|undefined} stream - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.stream = null; - - /** - * CreateStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.requestId = ""; - - /** - * CreateStreamRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.validateOnly = false; - - /** - * CreateStreamRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.force = false; - - /** - * Creates a new CreateStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1.ICreateStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CreateStreamRequest} CreateStreamRequest instance - */ - CreateStreamRequest.create = function create(properties) { - return new CreateStreamRequest(properties); - }; - - /** - * Encodes the specified CreateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1.ICreateStreamRequest} message CreateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStreamRequest.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.streamId != null && Object.hasOwnProperty.call(message, "streamId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.streamId); - if (message.stream != null && Object.hasOwnProperty.call(message, "stream")) - $root.google.cloud.datastream.v1.Stream.encode(message.stream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); - return writer; - }; - - /** - * Encodes the specified CreateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1.ICreateStreamRequest} message CreateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CreateStreamRequest} CreateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CreateStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.streamId = reader.string(); - break; - } - case 3: { - message.stream = $root.google.cloud.datastream.v1.Stream.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CreateStreamRequest} CreateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateStreamRequest.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.streamId != null && message.hasOwnProperty("streamId")) - if (!$util.isString(message.streamId)) - return "streamId: string expected"; - if (message.stream != null && message.hasOwnProperty("stream")) { - var error = $root.google.cloud.datastream.v1.Stream.verify(message.stream); - if (error) - return "stream." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a CreateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CreateStreamRequest} CreateStreamRequest - */ - CreateStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CreateStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1.CreateStreamRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.streamId != null) - message.streamId = String(object.streamId); - if (object.stream != null) { - if (typeof object.stream !== "object") - throw TypeError(".google.cloud.datastream.v1.CreateStreamRequest.stream: object expected"); - message.stream = $root.google.cloud.datastream.v1.Stream.fromObject(object.stream); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a CreateStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1.CreateStreamRequest} message CreateStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.streamId = ""; - object.stream = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.streamId != null && message.hasOwnProperty("streamId")) - object.streamId = message.streamId; - if (message.stream != null && message.hasOwnProperty("stream")) - object.stream = $root.google.cloud.datastream.v1.Stream.toObject(message.stream, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this CreateStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @instance - * @returns {Object.} JSON object - */ - CreateStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CreateStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CreateStreamRequest"; - }; - - return CreateStreamRequest; - })(); - - v1.UpdateStreamRequest = (function() { - - /** - * Properties of an UpdateStreamRequest. - * @memberof google.cloud.datastream.v1 - * @interface IUpdateStreamRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStreamRequest updateMask - * @property {google.cloud.datastream.v1.IStream|null} [stream] UpdateStreamRequest stream - * @property {string|null} [requestId] UpdateStreamRequest requestId - * @property {boolean|null} [validateOnly] UpdateStreamRequest validateOnly - * @property {boolean|null} [force] UpdateStreamRequest force - */ - - /** - * Constructs a new UpdateStreamRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an UpdateStreamRequest. - * @implements IUpdateStreamRequest - * @constructor - * @param {google.cloud.datastream.v1.IUpdateStreamRequest=} [properties] Properties to set - */ - function UpdateStreamRequest(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]]; - } - - /** - * UpdateStreamRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.updateMask = null; - - /** - * UpdateStreamRequest stream. - * @member {google.cloud.datastream.v1.IStream|null|undefined} stream - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.stream = null; - - /** - * UpdateStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.requestId = ""; - - /** - * UpdateStreamRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.validateOnly = false; - - /** - * UpdateStreamRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.force = false; - - /** - * Creates a new UpdateStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.UpdateStreamRequest} UpdateStreamRequest instance - */ - UpdateStreamRequest.create = function create(properties) { - return new UpdateStreamRequest(properties); - }; - - /** - * Encodes the specified UpdateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.UpdateStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateStreamRequest} message UpdateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStreamRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stream != null && Object.hasOwnProperty.call(message, "stream")) - $root.google.cloud.datastream.v1.Stream.encode(message.stream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; - - /** - * Encodes the specified UpdateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.UpdateStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1.IUpdateStreamRequest} message UpdateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.UpdateStreamRequest} UpdateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.UpdateStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stream = $root.google.cloud.datastream.v1.Stream.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.UpdateStreamRequest} UpdateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateStreamRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.stream != null && message.hasOwnProperty("stream")) { - var error = $root.google.cloud.datastream.v1.Stream.verify(message.stream); - if (error) - return "stream." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates an UpdateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.UpdateStreamRequest} UpdateStreamRequest - */ - UpdateStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.UpdateStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1.UpdateStreamRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datastream.v1.UpdateStreamRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.stream != null) { - if (typeof object.stream !== "object") - throw TypeError(".google.cloud.datastream.v1.UpdateStreamRequest.stream: object expected"); - message.stream = $root.google.cloud.datastream.v1.Stream.fromObject(object.stream); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from an UpdateStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1.UpdateStreamRequest} message UpdateStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.stream = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.stream != null && message.hasOwnProperty("stream")) - object.stream = $root.google.cloud.datastream.v1.Stream.toObject(message.stream, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this UpdateStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.UpdateStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.UpdateStreamRequest"; - }; - - return UpdateStreamRequest; - })(); - - v1.DeleteStreamRequest = (function() { - - /** - * Properties of a DeleteStreamRequest. - * @memberof google.cloud.datastream.v1 - * @interface IDeleteStreamRequest - * @property {string|null} [name] DeleteStreamRequest name - * @property {string|null} [requestId] DeleteStreamRequest requestId - */ - - /** - * Constructs a new DeleteStreamRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DeleteStreamRequest. - * @implements IDeleteStreamRequest - * @constructor - * @param {google.cloud.datastream.v1.IDeleteStreamRequest=} [properties] Properties to set - */ - function DeleteStreamRequest(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]]; - } - - /** - * DeleteStreamRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @instance - */ - DeleteStreamRequest.prototype.name = ""; - - /** - * DeleteStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @instance - */ - DeleteStreamRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DeleteStreamRequest} DeleteStreamRequest instance - */ - DeleteStreamRequest.create = function create(properties) { - return new DeleteStreamRequest(properties); - }; - - /** - * Encodes the specified DeleteStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteStreamRequest} message DeleteStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStreamRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteStreamRequest} message DeleteStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DeleteStreamRequest} DeleteStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DeleteStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DeleteStreamRequest} DeleteStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteStreamRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DeleteStreamRequest} DeleteStreamRequest - */ - DeleteStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DeleteStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1.DeleteStreamRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1.DeleteStreamRequest} message DeleteStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DeleteStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DeleteStreamRequest"; - }; - - return DeleteStreamRequest; - })(); - - v1.RunStreamRequest = (function() { - - /** - * Properties of a RunStreamRequest. - * @memberof google.cloud.datastream.v1 - * @interface IRunStreamRequest - * @property {string|null} [name] RunStreamRequest name - * @property {google.cloud.datastream.v1.ICdcStrategy|null} [cdcStrategy] RunStreamRequest cdcStrategy - * @property {boolean|null} [force] RunStreamRequest force - */ - - /** - * Constructs a new RunStreamRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a RunStreamRequest. - * @implements IRunStreamRequest - * @constructor - * @param {google.cloud.datastream.v1.IRunStreamRequest=} [properties] Properties to set - */ - function RunStreamRequest(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]]; - } - - /** - * RunStreamRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @instance - */ - RunStreamRequest.prototype.name = ""; - - /** - * RunStreamRequest cdcStrategy. - * @member {google.cloud.datastream.v1.ICdcStrategy|null|undefined} cdcStrategy - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @instance - */ - RunStreamRequest.prototype.cdcStrategy = null; - - /** - * RunStreamRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @instance - */ - RunStreamRequest.prototype.force = false; - - /** - * Creates a new RunStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {google.cloud.datastream.v1.IRunStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest instance - */ - RunStreamRequest.create = function create(properties) { - return new RunStreamRequest(properties); - }; - - /** - * Encodes the specified RunStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {google.cloud.datastream.v1.IRunStreamRequest} message RunStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunStreamRequest.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.cdcStrategy != null && Object.hasOwnProperty.call(message, "cdcStrategy")) - $root.google.cloud.datastream.v1.CdcStrategy.encode(message.cdcStrategy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - return writer; - }; - - /** - * Encodes the specified RunStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {google.cloud.datastream.v1.IRunStreamRequest} message RunStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.RunStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunStreamRequest.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.cdcStrategy != null && message.hasOwnProperty("cdcStrategy")) { - var error = $root.google.cloud.datastream.v1.CdcStrategy.verify(message.cdcStrategy); - if (error) - return "cdcStrategy." + error; - } - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a RunStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest - */ - RunStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.RunStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1.RunStreamRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cdcStrategy != null) { - if (typeof object.cdcStrategy !== "object") - throw TypeError(".google.cloud.datastream.v1.RunStreamRequest.cdcStrategy: object expected"); - message.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.fromObject(object.cdcStrategy); - } - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a RunStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {google.cloud.datastream.v1.RunStreamRequest} message RunStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.cdcStrategy = null; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cdcStrategy != null && message.hasOwnProperty("cdcStrategy")) - object.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.toObject(message.cdcStrategy, options); - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this RunStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @instance - * @returns {Object.} JSON object - */ - RunStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.RunStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.RunStreamRequest"; - }; - - return RunStreamRequest; - })(); - - v1.GetStreamObjectRequest = (function() { - - /** - * Properties of a GetStreamObjectRequest. - * @memberof google.cloud.datastream.v1 - * @interface IGetStreamObjectRequest - * @property {string|null} [name] GetStreamObjectRequest name - */ - - /** - * Constructs a new GetStreamObjectRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GetStreamObjectRequest. - * @implements IGetStreamObjectRequest - * @constructor - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest=} [properties] Properties to set - */ - function GetStreamObjectRequest(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]]; - } - - /** - * GetStreamObjectRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @instance - */ - GetStreamObjectRequest.prototype.name = ""; - - /** - * Creates a new GetStreamObjectRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GetStreamObjectRequest} GetStreamObjectRequest instance - */ - GetStreamObjectRequest.create = function create(properties) { - return new GetStreamObjectRequest(properties); - }; - - /** - * Encodes the specified GetStreamObjectRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetStreamObjectRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest} message GetStreamObjectRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamObjectRequest.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 GetStreamObjectRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetStreamObjectRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.IGetStreamObjectRequest} message GetStreamObjectRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamObjectRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetStreamObjectRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GetStreamObjectRequest} GetStreamObjectRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamObjectRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GetStreamObjectRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetStreamObjectRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GetStreamObjectRequest} GetStreamObjectRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamObjectRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetStreamObjectRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetStreamObjectRequest.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 GetStreamObjectRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GetStreamObjectRequest} GetStreamObjectRequest - */ - GetStreamObjectRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GetStreamObjectRequest) - return object; - var message = new $root.google.cloud.datastream.v1.GetStreamObjectRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetStreamObjectRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.GetStreamObjectRequest} message GetStreamObjectRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetStreamObjectRequest.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 GetStreamObjectRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @instance - * @returns {Object.} JSON object - */ - GetStreamObjectRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetStreamObjectRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GetStreamObjectRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetStreamObjectRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GetStreamObjectRequest"; - }; - - return GetStreamObjectRequest; - })(); - - v1.LookupStreamObjectRequest = (function() { - - /** - * Properties of a LookupStreamObjectRequest. - * @memberof google.cloud.datastream.v1 - * @interface ILookupStreamObjectRequest - * @property {string|null} [parent] LookupStreamObjectRequest parent - * @property {google.cloud.datastream.v1.ISourceObjectIdentifier|null} [sourceObjectIdentifier] LookupStreamObjectRequest sourceObjectIdentifier - */ - - /** - * Constructs a new LookupStreamObjectRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a LookupStreamObjectRequest. - * @implements ILookupStreamObjectRequest - * @constructor - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest=} [properties] Properties to set - */ - function LookupStreamObjectRequest(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]]; - } - - /** - * LookupStreamObjectRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @instance - */ - LookupStreamObjectRequest.prototype.parent = ""; - - /** - * LookupStreamObjectRequest sourceObjectIdentifier. - * @member {google.cloud.datastream.v1.ISourceObjectIdentifier|null|undefined} sourceObjectIdentifier - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @instance - */ - LookupStreamObjectRequest.prototype.sourceObjectIdentifier = null; - - /** - * Creates a new LookupStreamObjectRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.LookupStreamObjectRequest} LookupStreamObjectRequest instance - */ - LookupStreamObjectRequest.create = function create(properties) { - return new LookupStreamObjectRequest(properties); - }; - - /** - * Encodes the specified LookupStreamObjectRequest message. Does not implicitly {@link google.cloud.datastream.v1.LookupStreamObjectRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest} message LookupStreamObjectRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupStreamObjectRequest.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.sourceObjectIdentifier != null && Object.hasOwnProperty.call(message, "sourceObjectIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.encode(message.sourceObjectIdentifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LookupStreamObjectRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.LookupStreamObjectRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.ILookupStreamObjectRequest} message LookupStreamObjectRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupStreamObjectRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LookupStreamObjectRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.LookupStreamObjectRequest} LookupStreamObjectRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupStreamObjectRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.LookupStreamObjectRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.sourceObjectIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LookupStreamObjectRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.LookupStreamObjectRequest} LookupStreamObjectRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupStreamObjectRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LookupStreamObjectRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LookupStreamObjectRequest.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.sourceObjectIdentifier != null && message.hasOwnProperty("sourceObjectIdentifier")) { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.verify(message.sourceObjectIdentifier); - if (error) - return "sourceObjectIdentifier." + error; - } - return null; - }; - - /** - * Creates a LookupStreamObjectRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.LookupStreamObjectRequest} LookupStreamObjectRequest - */ - LookupStreamObjectRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.LookupStreamObjectRequest) - return object; - var message = new $root.google.cloud.datastream.v1.LookupStreamObjectRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sourceObjectIdentifier != null) { - if (typeof object.sourceObjectIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.LookupStreamObjectRequest.sourceObjectIdentifier: object expected"); - message.sourceObjectIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.fromObject(object.sourceObjectIdentifier); - } - return message; - }; - - /** - * Creates a plain object from a LookupStreamObjectRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {google.cloud.datastream.v1.LookupStreamObjectRequest} message LookupStreamObjectRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LookupStreamObjectRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.sourceObjectIdentifier = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sourceObjectIdentifier != null && message.hasOwnProperty("sourceObjectIdentifier")) - object.sourceObjectIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.toObject(message.sourceObjectIdentifier, options); - return object; - }; - - /** - * Converts this LookupStreamObjectRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @instance - * @returns {Object.} JSON object - */ - LookupStreamObjectRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LookupStreamObjectRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.LookupStreamObjectRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LookupStreamObjectRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.LookupStreamObjectRequest"; - }; - - return LookupStreamObjectRequest; - })(); - - v1.StartBackfillJobRequest = (function() { - - /** - * Properties of a StartBackfillJobRequest. - * @memberof google.cloud.datastream.v1 - * @interface IStartBackfillJobRequest - * @property {string|null} [object] StartBackfillJobRequest object - */ - - /** - * Constructs a new StartBackfillJobRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StartBackfillJobRequest. - * @implements IStartBackfillJobRequest - * @constructor - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest=} [properties] Properties to set - */ - function StartBackfillJobRequest(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]]; - } - - /** - * StartBackfillJobRequest object. - * @member {string} object - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @instance - */ - StartBackfillJobRequest.prototype.object = ""; - - /** - * Creates a new StartBackfillJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StartBackfillJobRequest} StartBackfillJobRequest instance - */ - StartBackfillJobRequest.create = function create(properties) { - return new StartBackfillJobRequest(properties); - }; - - /** - * Encodes the specified StartBackfillJobRequest message. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest} message StartBackfillJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartBackfillJobRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.object); - return writer; - }; - - /** - * Encodes the specified StartBackfillJobRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobRequest} message StartBackfillJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartBackfillJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartBackfillJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StartBackfillJobRequest} StartBackfillJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartBackfillJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StartBackfillJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.object = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartBackfillJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StartBackfillJobRequest} StartBackfillJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartBackfillJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartBackfillJobRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartBackfillJobRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.object != null && message.hasOwnProperty("object")) - if (!$util.isString(message.object)) - return "object: string expected"; - return null; - }; - - /** - * Creates a StartBackfillJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StartBackfillJobRequest} StartBackfillJobRequest - */ - StartBackfillJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StartBackfillJobRequest) - return object; - var message = new $root.google.cloud.datastream.v1.StartBackfillJobRequest(); - if (object.object != null) - message.object = String(object.object); - return message; - }; - - /** - * Creates a plain object from a StartBackfillJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.StartBackfillJobRequest} message StartBackfillJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartBackfillJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.object = ""; - if (message.object != null && message.hasOwnProperty("object")) - object.object = message.object; - return object; - }; - - /** - * Converts this StartBackfillJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @instance - * @returns {Object.} JSON object - */ - StartBackfillJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartBackfillJobRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StartBackfillJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartBackfillJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StartBackfillJobRequest"; - }; - - return StartBackfillJobRequest; - })(); - - v1.StartBackfillJobResponse = (function() { - - /** - * Properties of a StartBackfillJobResponse. - * @memberof google.cloud.datastream.v1 - * @interface IStartBackfillJobResponse - * @property {google.cloud.datastream.v1.IStreamObject|null} [object] StartBackfillJobResponse object - */ - - /** - * Constructs a new StartBackfillJobResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StartBackfillJobResponse. - * @implements IStartBackfillJobResponse - * @constructor - * @param {google.cloud.datastream.v1.IStartBackfillJobResponse=} [properties] Properties to set - */ - function StartBackfillJobResponse(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]]; - } - - /** - * StartBackfillJobResponse object. - * @member {google.cloud.datastream.v1.IStreamObject|null|undefined} object - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @instance - */ - StartBackfillJobResponse.prototype.object = null; - - /** - * Creates a new StartBackfillJobResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StartBackfillJobResponse} StartBackfillJobResponse instance - */ - StartBackfillJobResponse.create = function create(properties) { - return new StartBackfillJobResponse(properties); - }; - - /** - * Encodes the specified StartBackfillJobResponse message. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobResponse} message StartBackfillJobResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartBackfillJobResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - $root.google.cloud.datastream.v1.StreamObject.encode(message.object, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StartBackfillJobResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StartBackfillJobResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStartBackfillJobResponse} message StartBackfillJobResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartBackfillJobResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartBackfillJobResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StartBackfillJobResponse} StartBackfillJobResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartBackfillJobResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StartBackfillJobResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.object = $root.google.cloud.datastream.v1.StreamObject.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartBackfillJobResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StartBackfillJobResponse} StartBackfillJobResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartBackfillJobResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartBackfillJobResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartBackfillJobResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.object != null && message.hasOwnProperty("object")) { - var error = $root.google.cloud.datastream.v1.StreamObject.verify(message.object); - if (error) - return "object." + error; - } - return null; - }; - - /** - * Creates a StartBackfillJobResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StartBackfillJobResponse} StartBackfillJobResponse - */ - StartBackfillJobResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StartBackfillJobResponse) - return object; - var message = new $root.google.cloud.datastream.v1.StartBackfillJobResponse(); - if (object.object != null) { - if (typeof object.object !== "object") - throw TypeError(".google.cloud.datastream.v1.StartBackfillJobResponse.object: object expected"); - message.object = $root.google.cloud.datastream.v1.StreamObject.fromObject(object.object); - } - return message; - }; - - /** - * Creates a plain object from a StartBackfillJobResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.StartBackfillJobResponse} message StartBackfillJobResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartBackfillJobResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.object = null; - if (message.object != null && message.hasOwnProperty("object")) - object.object = $root.google.cloud.datastream.v1.StreamObject.toObject(message.object, options); - return object; - }; - - /** - * Converts this StartBackfillJobResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @instance - * @returns {Object.} JSON object - */ - StartBackfillJobResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartBackfillJobResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StartBackfillJobResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartBackfillJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StartBackfillJobResponse"; - }; - - return StartBackfillJobResponse; - })(); - - v1.StopBackfillJobRequest = (function() { - - /** - * Properties of a StopBackfillJobRequest. - * @memberof google.cloud.datastream.v1 - * @interface IStopBackfillJobRequest - * @property {string|null} [object] StopBackfillJobRequest object - */ - - /** - * Constructs a new StopBackfillJobRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StopBackfillJobRequest. - * @implements IStopBackfillJobRequest - * @constructor - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest=} [properties] Properties to set - */ - function StopBackfillJobRequest(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]]; - } - - /** - * StopBackfillJobRequest object. - * @member {string} object - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @instance - */ - StopBackfillJobRequest.prototype.object = ""; - - /** - * Creates a new StopBackfillJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StopBackfillJobRequest} StopBackfillJobRequest instance - */ - StopBackfillJobRequest.create = function create(properties) { - return new StopBackfillJobRequest(properties); - }; - - /** - * Encodes the specified StopBackfillJobRequest message. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest} message StopBackfillJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopBackfillJobRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.object); - return writer; - }; - - /** - * Encodes the specified StopBackfillJobRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobRequest} message StopBackfillJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopBackfillJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopBackfillJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StopBackfillJobRequest} StopBackfillJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopBackfillJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StopBackfillJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.object = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopBackfillJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StopBackfillJobRequest} StopBackfillJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopBackfillJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopBackfillJobRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopBackfillJobRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.object != null && message.hasOwnProperty("object")) - if (!$util.isString(message.object)) - return "object: string expected"; - return null; - }; - - /** - * Creates a StopBackfillJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StopBackfillJobRequest} StopBackfillJobRequest - */ - StopBackfillJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StopBackfillJobRequest) - return object; - var message = new $root.google.cloud.datastream.v1.StopBackfillJobRequest(); - if (object.object != null) - message.object = String(object.object); - return message; - }; - - /** - * Creates a plain object from a StopBackfillJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {google.cloud.datastream.v1.StopBackfillJobRequest} message StopBackfillJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopBackfillJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.object = ""; - if (message.object != null && message.hasOwnProperty("object")) - object.object = message.object; - return object; - }; - - /** - * Converts this StopBackfillJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @instance - * @returns {Object.} JSON object - */ - StopBackfillJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopBackfillJobRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StopBackfillJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopBackfillJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StopBackfillJobRequest"; - }; - - return StopBackfillJobRequest; - })(); - - v1.StopBackfillJobResponse = (function() { - - /** - * Properties of a StopBackfillJobResponse. - * @memberof google.cloud.datastream.v1 - * @interface IStopBackfillJobResponse - * @property {google.cloud.datastream.v1.IStreamObject|null} [object] StopBackfillJobResponse object - */ - - /** - * Constructs a new StopBackfillJobResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StopBackfillJobResponse. - * @implements IStopBackfillJobResponse - * @constructor - * @param {google.cloud.datastream.v1.IStopBackfillJobResponse=} [properties] Properties to set - */ - function StopBackfillJobResponse(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]]; - } - - /** - * StopBackfillJobResponse object. - * @member {google.cloud.datastream.v1.IStreamObject|null|undefined} object - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @instance - */ - StopBackfillJobResponse.prototype.object = null; - - /** - * Creates a new StopBackfillJobResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StopBackfillJobResponse} StopBackfillJobResponse instance - */ - StopBackfillJobResponse.create = function create(properties) { - return new StopBackfillJobResponse(properties); - }; - - /** - * Encodes the specified StopBackfillJobResponse message. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobResponse} message StopBackfillJobResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopBackfillJobResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - $root.google.cloud.datastream.v1.StreamObject.encode(message.object, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StopBackfillJobResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StopBackfillJobResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.IStopBackfillJobResponse} message StopBackfillJobResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopBackfillJobResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopBackfillJobResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StopBackfillJobResponse} StopBackfillJobResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopBackfillJobResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StopBackfillJobResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.object = $root.google.cloud.datastream.v1.StreamObject.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopBackfillJobResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StopBackfillJobResponse} StopBackfillJobResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopBackfillJobResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopBackfillJobResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopBackfillJobResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.object != null && message.hasOwnProperty("object")) { - var error = $root.google.cloud.datastream.v1.StreamObject.verify(message.object); - if (error) - return "object." + error; - } - return null; - }; - - /** - * Creates a StopBackfillJobResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StopBackfillJobResponse} StopBackfillJobResponse - */ - StopBackfillJobResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StopBackfillJobResponse) - return object; - var message = new $root.google.cloud.datastream.v1.StopBackfillJobResponse(); - if (object.object != null) { - if (typeof object.object !== "object") - throw TypeError(".google.cloud.datastream.v1.StopBackfillJobResponse.object: object expected"); - message.object = $root.google.cloud.datastream.v1.StreamObject.fromObject(object.object); - } - return message; - }; - - /** - * Creates a plain object from a StopBackfillJobResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {google.cloud.datastream.v1.StopBackfillJobResponse} message StopBackfillJobResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopBackfillJobResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.object = null; - if (message.object != null && message.hasOwnProperty("object")) - object.object = $root.google.cloud.datastream.v1.StreamObject.toObject(message.object, options); - return object; - }; - - /** - * Converts this StopBackfillJobResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @instance - * @returns {Object.} JSON object - */ - StopBackfillJobResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopBackfillJobResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StopBackfillJobResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopBackfillJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StopBackfillJobResponse"; - }; - - return StopBackfillJobResponse; - })(); - - v1.ListStreamObjectsRequest = (function() { - - /** - * Properties of a ListStreamObjectsRequest. - * @memberof google.cloud.datastream.v1 - * @interface IListStreamObjectsRequest - * @property {string|null} [parent] ListStreamObjectsRequest parent - * @property {number|null} [pageSize] ListStreamObjectsRequest pageSize - * @property {string|null} [pageToken] ListStreamObjectsRequest pageToken - */ - - /** - * Constructs a new ListStreamObjectsRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListStreamObjectsRequest. - * @implements IListStreamObjectsRequest - * @constructor - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest=} [properties] Properties to set - */ - function ListStreamObjectsRequest(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]]; - } - - /** - * ListStreamObjectsRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @instance - */ - ListStreamObjectsRequest.prototype.parent = ""; - - /** - * ListStreamObjectsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @instance - */ - ListStreamObjectsRequest.prototype.pageSize = 0; - - /** - * ListStreamObjectsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @instance - */ - ListStreamObjectsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListStreamObjectsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListStreamObjectsRequest} ListStreamObjectsRequest instance - */ - ListStreamObjectsRequest.create = function create(properties) { - return new ListStreamObjectsRequest(properties); - }; - - /** - * Encodes the specified ListStreamObjectsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest} message ListStreamObjectsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamObjectsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListStreamObjectsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsRequest} message ListStreamObjectsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamObjectsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamObjectsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListStreamObjectsRequest} ListStreamObjectsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamObjectsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListStreamObjectsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamObjectsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListStreamObjectsRequest} ListStreamObjectsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamObjectsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamObjectsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamObjectsRequest.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.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 ListStreamObjectsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListStreamObjectsRequest} ListStreamObjectsRequest - */ - ListStreamObjectsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListStreamObjectsRequest) - return object; - var message = new $root.google.cloud.datastream.v1.ListStreamObjectsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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 ListStreamObjectsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {google.cloud.datastream.v1.ListStreamObjectsRequest} message ListStreamObjectsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamObjectsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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 ListStreamObjectsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @instance - * @returns {Object.} JSON object - */ - ListStreamObjectsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamObjectsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListStreamObjectsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamObjectsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListStreamObjectsRequest"; - }; - - return ListStreamObjectsRequest; - })(); - - v1.ListStreamObjectsResponse = (function() { - - /** - * Properties of a ListStreamObjectsResponse. - * @memberof google.cloud.datastream.v1 - * @interface IListStreamObjectsResponse - * @property {Array.|null} [streamObjects] ListStreamObjectsResponse streamObjects - * @property {string|null} [nextPageToken] ListStreamObjectsResponse nextPageToken - */ - - /** - * Constructs a new ListStreamObjectsResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListStreamObjectsResponse. - * @implements IListStreamObjectsResponse - * @constructor - * @param {google.cloud.datastream.v1.IListStreamObjectsResponse=} [properties] Properties to set - */ - function ListStreamObjectsResponse(properties) { - this.streamObjects = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListStreamObjectsResponse streamObjects. - * @member {Array.} streamObjects - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @instance - */ - ListStreamObjectsResponse.prototype.streamObjects = $util.emptyArray; - - /** - * ListStreamObjectsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @instance - */ - ListStreamObjectsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListStreamObjectsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListStreamObjectsResponse} ListStreamObjectsResponse instance - */ - ListStreamObjectsResponse.create = function create(properties) { - return new ListStreamObjectsResponse(properties); - }; - - /** - * Encodes the specified ListStreamObjectsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsResponse} message ListStreamObjectsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamObjectsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.streamObjects != null && message.streamObjects.length) - for (var i = 0; i < message.streamObjects.length; ++i) - $root.google.cloud.datastream.v1.StreamObject.encode(message.streamObjects[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 ListStreamObjectsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListStreamObjectsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {google.cloud.datastream.v1.IListStreamObjectsResponse} message ListStreamObjectsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamObjectsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamObjectsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListStreamObjectsResponse} ListStreamObjectsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamObjectsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListStreamObjectsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.streamObjects && message.streamObjects.length)) - message.streamObjects = []; - message.streamObjects.push($root.google.cloud.datastream.v1.StreamObject.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamObjectsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListStreamObjectsResponse} ListStreamObjectsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamObjectsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamObjectsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamObjectsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.streamObjects != null && message.hasOwnProperty("streamObjects")) { - if (!Array.isArray(message.streamObjects)) - return "streamObjects: array expected"; - for (var i = 0; i < message.streamObjects.length; ++i) { - var error = $root.google.cloud.datastream.v1.StreamObject.verify(message.streamObjects[i]); - if (error) - return "streamObjects." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListStreamObjectsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListStreamObjectsResponse} ListStreamObjectsResponse - */ - ListStreamObjectsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListStreamObjectsResponse) - return object; - var message = new $root.google.cloud.datastream.v1.ListStreamObjectsResponse(); - if (object.streamObjects) { - if (!Array.isArray(object.streamObjects)) - throw TypeError(".google.cloud.datastream.v1.ListStreamObjectsResponse.streamObjects: array expected"); - message.streamObjects = []; - for (var i = 0; i < object.streamObjects.length; ++i) { - if (typeof object.streamObjects[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ListStreamObjectsResponse.streamObjects: object expected"); - message.streamObjects[i] = $root.google.cloud.datastream.v1.StreamObject.fromObject(object.streamObjects[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListStreamObjectsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {google.cloud.datastream.v1.ListStreamObjectsResponse} message ListStreamObjectsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamObjectsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.streamObjects = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.streamObjects && message.streamObjects.length) { - object.streamObjects = []; - for (var j = 0; j < message.streamObjects.length; ++j) - object.streamObjects[j] = $root.google.cloud.datastream.v1.StreamObject.toObject(message.streamObjects[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListStreamObjectsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @instance - * @returns {Object.} JSON object - */ - ListStreamObjectsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamObjectsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListStreamObjectsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamObjectsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListStreamObjectsResponse"; - }; - - return ListStreamObjectsResponse; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.datastream.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion - * @property {google.cloud.datastream.v1.IValidationResult|null} [validationResult] OperationMetadata validationResult - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.datastream.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(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]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * OperationMetadata validationResult. - * @member {google.cloud.datastream.v1.IValidationResult|null|undefined} validationResult - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.validationResult = null; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.datastream.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - if (message.validationResult != null && Object.hasOwnProperty.call(message, "validationResult")) - $root.google.cloud.datastream.v1.ValidationResult.encode(message.validationResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - break; - } - case 8: { - message.validationResult = $root.google.cloud.datastream.v1.ValidationResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; - if (message.validationResult != null && message.hasOwnProperty("validationResult")) { - var error = $root.google.cloud.datastream.v1.ValidationResult.verify(message.validationResult); - if (error) - return "validationResult." + error; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.datastream.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.datastream.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - if (object.validationResult != null) { - if (typeof object.validationResult !== "object") - throw TypeError(".google.cloud.datastream.v1.OperationMetadata.validationResult: object expected"); - message.validationResult = $root.google.cloud.datastream.v1.ValidationResult.fromObject(object.validationResult); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - object.validationResult = null; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - if (message.validationResult != null && message.hasOwnProperty("validationResult")) - object.validationResult = $root.google.cloud.datastream.v1.ValidationResult.toObject(message.validationResult, options); - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.CreatePrivateConnectionRequest = (function() { - - /** - * Properties of a CreatePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @interface ICreatePrivateConnectionRequest - * @property {string|null} [parent] CreatePrivateConnectionRequest parent - * @property {string|null} [privateConnectionId] CreatePrivateConnectionRequest privateConnectionId - * @property {google.cloud.datastream.v1.IPrivateConnection|null} [privateConnection] CreatePrivateConnectionRequest privateConnection - * @property {string|null} [requestId] CreatePrivateConnectionRequest requestId - * @property {boolean|null} [force] CreatePrivateConnectionRequest force - */ - - /** - * Constructs a new CreatePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a CreatePrivateConnectionRequest. - * @implements ICreatePrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest=} [properties] Properties to set - */ - function CreatePrivateConnectionRequest(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]]; - } - - /** - * CreatePrivateConnectionRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.parent = ""; - - /** - * CreatePrivateConnectionRequest privateConnectionId. - * @member {string} privateConnectionId - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.privateConnectionId = ""; - - /** - * CreatePrivateConnectionRequest privateConnection. - * @member {google.cloud.datastream.v1.IPrivateConnection|null|undefined} privateConnection - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.privateConnection = null; - - /** - * CreatePrivateConnectionRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.requestId = ""; - - /** - * CreatePrivateConnectionRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.force = false; - - /** - * Creates a new CreatePrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest instance - */ - CreatePrivateConnectionRequest.create = function create(properties) { - return new CreatePrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreatePrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePrivateConnectionRequest.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.privateConnectionId != null && Object.hasOwnProperty.call(message, "privateConnectionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateConnectionId); - if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) - $root.google.cloud.datastream.v1.PrivateConnection.encode(message.privateConnection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); - return writer; - }; - - /** - * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreatePrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CreatePrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.privateConnectionId = reader.string(); - break; - } - case 3: { - message.privateConnection = $root.google.cloud.datastream.v1.PrivateConnection.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 6: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePrivateConnectionRequest.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.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) - if (!$util.isString(message.privateConnectionId)) - return "privateConnectionId: string expected"; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) { - var error = $root.google.cloud.datastream.v1.PrivateConnection.verify(message.privateConnection); - if (error) - return "privateConnection." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - */ - CreatePrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CreatePrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1.CreatePrivateConnectionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.privateConnectionId != null) - message.privateConnectionId = String(object.privateConnectionId); - if (object.privateConnection != null) { - if (typeof object.privateConnection !== "object") - throw TypeError(".google.cloud.datastream.v1.CreatePrivateConnectionRequest.privateConnection: object expected"); - message.privateConnection = $root.google.cloud.datastream.v1.PrivateConnection.fromObject(object.privateConnection); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.CreatePrivateConnectionRequest} message CreatePrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePrivateConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.privateConnectionId = ""; - object.privateConnection = null; - object.requestId = ""; - object.force = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) - object.privateConnectionId = message.privateConnectionId; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - object.privateConnection = $root.google.cloud.datastream.v1.PrivateConnection.toObject(message.privateConnection, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this CreatePrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CreatePrivateConnectionRequest"; - }; - - return CreatePrivateConnectionRequest; - })(); - - v1.ListPrivateConnectionsRequest = (function() { - - /** - * Properties of a ListPrivateConnectionsRequest. - * @memberof google.cloud.datastream.v1 - * @interface IListPrivateConnectionsRequest - * @property {string|null} [parent] ListPrivateConnectionsRequest parent - * @property {number|null} [pageSize] ListPrivateConnectionsRequest pageSize - * @property {string|null} [pageToken] ListPrivateConnectionsRequest pageToken - * @property {string|null} [filter] ListPrivateConnectionsRequest filter - * @property {string|null} [orderBy] ListPrivateConnectionsRequest orderBy - */ - - /** - * Constructs a new ListPrivateConnectionsRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListPrivateConnectionsRequest. - * @implements IListPrivateConnectionsRequest - * @constructor - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest=} [properties] Properties to set - */ - function ListPrivateConnectionsRequest(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]]; - } - - /** - * ListPrivateConnectionsRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.parent = ""; - - /** - * ListPrivateConnectionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.pageSize = 0; - - /** - * ListPrivateConnectionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.pageToken = ""; - - /** - * ListPrivateConnectionsRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.filter = ""; - - /** - * ListPrivateConnectionsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListPrivateConnectionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest instance - */ - ListPrivateConnectionsRequest.create = function create(properties) { - return new ListPrivateConnectionsRequest(properties); - }; - - /** - * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListPrivateConnectionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPrivateConnectionsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPrivateConnectionsRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - */ - ListPrivateConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListPrivateConnectionsRequest) - return object; - var message = new $root.google.cloud.datastream.v1.ListPrivateConnectionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1.ListPrivateConnectionsRequest} message ListPrivateConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPrivateConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListPrivateConnectionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPrivateConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPrivateConnectionsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPrivateConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListPrivateConnectionsRequest"; - }; - - return ListPrivateConnectionsRequest; - })(); - - v1.ListPrivateConnectionsResponse = (function() { - - /** - * Properties of a ListPrivateConnectionsResponse. - * @memberof google.cloud.datastream.v1 - * @interface IListPrivateConnectionsResponse - * @property {Array.|null} [privateConnections] ListPrivateConnectionsResponse privateConnections - * @property {string|null} [nextPageToken] ListPrivateConnectionsResponse nextPageToken - * @property {Array.|null} [unreachable] ListPrivateConnectionsResponse unreachable - */ - - /** - * Constructs a new ListPrivateConnectionsResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListPrivateConnectionsResponse. - * @implements IListPrivateConnectionsResponse - * @constructor - * @param {google.cloud.datastream.v1.IListPrivateConnectionsResponse=} [properties] Properties to set - */ - function ListPrivateConnectionsResponse(properties) { - this.privateConnections = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPrivateConnectionsResponse privateConnections. - * @member {Array.} privateConnections - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.privateConnections = $util.emptyArray; - - /** - * ListPrivateConnectionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.nextPageToken = ""; - - /** - * ListPrivateConnectionsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListPrivateConnectionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse instance - */ - ListPrivateConnectionsResponse.create = function create(properties) { - return new ListPrivateConnectionsResponse(properties); - }; - - /** - * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateConnections != null && message.privateConnections.length) - for (var i = 0; i < message.privateConnections.length; ++i) - $root.google.cloud.datastream.v1.PrivateConnection.encode(message.privateConnections[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListPrivateConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListPrivateConnectionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.privateConnections && message.privateConnections.length)) - message.privateConnections = []; - message.privateConnections.push($root.google.cloud.datastream.v1.PrivateConnection.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPrivateConnectionsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPrivateConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateConnections != null && message.hasOwnProperty("privateConnections")) { - if (!Array.isArray(message.privateConnections)) - return "privateConnections: array expected"; - for (var i = 0; i < message.privateConnections.length; ++i) { - var error = $root.google.cloud.datastream.v1.PrivateConnection.verify(message.privateConnections[i]); - if (error) - return "privateConnections." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - */ - ListPrivateConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListPrivateConnectionsResponse) - return object; - var message = new $root.google.cloud.datastream.v1.ListPrivateConnectionsResponse(); - if (object.privateConnections) { - if (!Array.isArray(object.privateConnections)) - throw TypeError(".google.cloud.datastream.v1.ListPrivateConnectionsResponse.privateConnections: array expected"); - message.privateConnections = []; - for (var i = 0; i < object.privateConnections.length; ++i) { - if (typeof object.privateConnections[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ListPrivateConnectionsResponse.privateConnections: object expected"); - message.privateConnections[i] = $root.google.cloud.datastream.v1.PrivateConnection.fromObject(object.privateConnections[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1.ListPrivateConnectionsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1.ListPrivateConnectionsResponse} message ListPrivateConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPrivateConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.privateConnections = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.privateConnections && message.privateConnections.length) { - object.privateConnections = []; - for (var j = 0; j < message.privateConnections.length; ++j) - object.privateConnections[j] = $root.google.cloud.datastream.v1.PrivateConnection.toObject(message.privateConnections[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListPrivateConnectionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPrivateConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPrivateConnectionsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListPrivateConnectionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPrivateConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListPrivateConnectionsResponse"; - }; - - return ListPrivateConnectionsResponse; - })(); - - v1.DeletePrivateConnectionRequest = (function() { - - /** - * Properties of a DeletePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @interface IDeletePrivateConnectionRequest - * @property {string|null} [name] DeletePrivateConnectionRequest name - * @property {string|null} [requestId] DeletePrivateConnectionRequest requestId - * @property {boolean|null} [force] DeletePrivateConnectionRequest force - */ - - /** - * Constructs a new DeletePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DeletePrivateConnectionRequest. - * @implements IDeletePrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest=} [properties] Properties to set - */ - function DeletePrivateConnectionRequest(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]]; - } - - /** - * DeletePrivateConnectionRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.name = ""; - - /** - * DeletePrivateConnectionRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.requestId = ""; - - /** - * DeletePrivateConnectionRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.force = false; - - /** - * Creates a new DeletePrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest instance - */ - DeletePrivateConnectionRequest.create = function create(properties) { - return new DeletePrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeletePrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePrivateConnectionRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeletePrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DeletePrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePrivateConnectionRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - */ - DeletePrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DeletePrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1.DeletePrivateConnectionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.DeletePrivateConnectionRequest} message DeletePrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePrivateConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeletePrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DeletePrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DeletePrivateConnectionRequest"; - }; - - return DeletePrivateConnectionRequest; - })(); - - v1.GetPrivateConnectionRequest = (function() { - - /** - * Properties of a GetPrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @interface IGetPrivateConnectionRequest - * @property {string|null} [name] GetPrivateConnectionRequest name - */ - - /** - * Constructs a new GetPrivateConnectionRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GetPrivateConnectionRequest. - * @implements IGetPrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest=} [properties] Properties to set - */ - function GetPrivateConnectionRequest(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]]; - } - - /** - * GetPrivateConnectionRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @instance - */ - GetPrivateConnectionRequest.prototype.name = ""; - - /** - * Creates a new GetPrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest instance - */ - GetPrivateConnectionRequest.create = function create(properties) { - return new GetPrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetPrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetPrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GetPrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - */ - GetPrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GetPrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1.GetPrivateConnectionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1.GetPrivateConnectionRequest} message GetPrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - GetPrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GetPrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GetPrivateConnectionRequest"; - }; - - return GetPrivateConnectionRequest; - })(); - - v1.CreateRouteRequest = (function() { - - /** - * Properties of a CreateRouteRequest. - * @memberof google.cloud.datastream.v1 - * @interface ICreateRouteRequest - * @property {string|null} [parent] CreateRouteRequest parent - * @property {string|null} [routeId] CreateRouteRequest routeId - * @property {google.cloud.datastream.v1.IRoute|null} [route] CreateRouteRequest route - * @property {string|null} [requestId] CreateRouteRequest requestId - */ - - /** - * Constructs a new CreateRouteRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a CreateRouteRequest. - * @implements ICreateRouteRequest - * @constructor - * @param {google.cloud.datastream.v1.ICreateRouteRequest=} [properties] Properties to set - */ - function CreateRouteRequest(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]]; - } - - /** - * CreateRouteRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.parent = ""; - - /** - * CreateRouteRequest routeId. - * @member {string} routeId - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.routeId = ""; - - /** - * CreateRouteRequest route. - * @member {google.cloud.datastream.v1.IRoute|null|undefined} route - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.route = null; - - /** - * CreateRouteRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.requestId = ""; - - /** - * Creates a new CreateRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1.ICreateRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CreateRouteRequest} CreateRouteRequest instance - */ - CreateRouteRequest.create = function create(properties) { - return new CreateRouteRequest(properties); - }; - - /** - * Encodes the specified CreateRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.CreateRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1.ICreateRouteRequest} message CreateRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRouteRequest.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.routeId != null && Object.hasOwnProperty.call(message, "routeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.routeId); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.datastream.v1.Route.encode(message.route, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreateRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CreateRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1.ICreateRouteRequest} message CreateRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CreateRouteRequest} CreateRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CreateRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.routeId = reader.string(); - break; - } - case 3: { - message.route = $root.google.cloud.datastream.v1.Route.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CreateRouteRequest} CreateRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRouteRequest.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.routeId != null && message.hasOwnProperty("routeId")) - if (!$util.isString(message.routeId)) - return "routeId: string expected"; - if (message.route != null && message.hasOwnProperty("route")) { - var error = $root.google.cloud.datastream.v1.Route.verify(message.route); - if (error) - return "route." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CreateRouteRequest} CreateRouteRequest - */ - CreateRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CreateRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1.CreateRouteRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.routeId != null) - message.routeId = String(object.routeId); - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.datastream.v1.CreateRouteRequest.route: object expected"); - message.route = $root.google.cloud.datastream.v1.Route.fromObject(object.route); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1.CreateRouteRequest} message CreateRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRouteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.routeId = ""; - object.route = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.routeId != null && message.hasOwnProperty("routeId")) - object.routeId = message.routeId; - if (message.route != null && message.hasOwnProperty("route")) - object.route = $root.google.cloud.datastream.v1.Route.toObject(message.route, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CreateRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CreateRouteRequest"; - }; - - return CreateRouteRequest; - })(); - - v1.ListRoutesRequest = (function() { - - /** - * Properties of a ListRoutesRequest. - * @memberof google.cloud.datastream.v1 - * @interface IListRoutesRequest - * @property {string|null} [parent] ListRoutesRequest parent - * @property {number|null} [pageSize] ListRoutesRequest pageSize - * @property {string|null} [pageToken] ListRoutesRequest pageToken - * @property {string|null} [filter] ListRoutesRequest filter - * @property {string|null} [orderBy] ListRoutesRequest orderBy - */ - - /** - * Constructs a new ListRoutesRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListRoutesRequest. - * @implements IListRoutesRequest - * @constructor - * @param {google.cloud.datastream.v1.IListRoutesRequest=} [properties] Properties to set - */ - function ListRoutesRequest(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]]; - } - - /** - * ListRoutesRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.parent = ""; - - /** - * ListRoutesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.pageSize = 0; - - /** - * ListRoutesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.pageToken = ""; - - /** - * ListRoutesRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.filter = ""; - - /** - * ListRoutesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListRoutesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1.IListRoutesRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListRoutesRequest} ListRoutesRequest instance - */ - ListRoutesRequest.create = function create(properties) { - return new ListRoutesRequest(properties); - }; - - /** - * Encodes the specified ListRoutesRequest message. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1.IListRoutesRequest} message ListRoutesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListRoutesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1.IListRoutesRequest} message ListRoutesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListRoutesRequest} ListRoutesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListRoutesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListRoutesRequest} ListRoutesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRoutesRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRoutesRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListRoutesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListRoutesRequest} ListRoutesRequest - */ - ListRoutesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListRoutesRequest) - return object; - var message = new $root.google.cloud.datastream.v1.ListRoutesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListRoutesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1.ListRoutesRequest} message ListRoutesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRoutesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListRoutesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @instance - * @returns {Object.} JSON object - */ - ListRoutesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRoutesRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListRoutesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRoutesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListRoutesRequest"; - }; - - return ListRoutesRequest; - })(); - - v1.ListRoutesResponse = (function() { - - /** - * Properties of a ListRoutesResponse. - * @memberof google.cloud.datastream.v1 - * @interface IListRoutesResponse - * @property {Array.|null} [routes] ListRoutesResponse routes - * @property {string|null} [nextPageToken] ListRoutesResponse nextPageToken - * @property {Array.|null} [unreachable] ListRoutesResponse unreachable - */ - - /** - * Constructs a new ListRoutesResponse. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ListRoutesResponse. - * @implements IListRoutesResponse - * @constructor - * @param {google.cloud.datastream.v1.IListRoutesResponse=} [properties] Properties to set - */ - function ListRoutesResponse(properties) { - this.routes = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRoutesResponse routes. - * @member {Array.} routes - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.routes = $util.emptyArray; - - /** - * ListRoutesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.nextPageToken = ""; - - /** - * ListRoutesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListRoutesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1.IListRoutesResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ListRoutesResponse} ListRoutesResponse instance - */ - ListRoutesResponse.create = function create(properties) { - return new ListRoutesResponse(properties); - }; - - /** - * Encodes the specified ListRoutesResponse message. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1.IListRoutesResponse} message ListRoutesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.routes != null && message.routes.length) - for (var i = 0; i < message.routes.length; ++i) - $root.google.cloud.datastream.v1.Route.encode(message.routes[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListRoutesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ListRoutesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1.IListRoutesResponse} message ListRoutesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ListRoutesResponse} ListRoutesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ListRoutesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.routes && message.routes.length)) - message.routes = []; - message.routes.push($root.google.cloud.datastream.v1.Route.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ListRoutesResponse} ListRoutesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRoutesResponse message. - * @function verify - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRoutesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.routes != null && message.hasOwnProperty("routes")) { - if (!Array.isArray(message.routes)) - return "routes: array expected"; - for (var i = 0; i < message.routes.length; ++i) { - var error = $root.google.cloud.datastream.v1.Route.verify(message.routes[i]); - if (error) - return "routes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListRoutesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ListRoutesResponse} ListRoutesResponse - */ - ListRoutesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ListRoutesResponse) - return object; - var message = new $root.google.cloud.datastream.v1.ListRoutesResponse(); - if (object.routes) { - if (!Array.isArray(object.routes)) - throw TypeError(".google.cloud.datastream.v1.ListRoutesResponse.routes: array expected"); - message.routes = []; - for (var i = 0; i < object.routes.length; ++i) { - if (typeof object.routes[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ListRoutesResponse.routes: object expected"); - message.routes[i] = $root.google.cloud.datastream.v1.Route.fromObject(object.routes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1.ListRoutesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListRoutesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1.ListRoutesResponse} message ListRoutesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRoutesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.routes = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.routes && message.routes.length) { - object.routes = []; - for (var j = 0; j < message.routes.length; ++j) - object.routes[j] = $root.google.cloud.datastream.v1.Route.toObject(message.routes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListRoutesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @instance - * @returns {Object.} JSON object - */ - ListRoutesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRoutesResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ListRoutesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRoutesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ListRoutesResponse"; - }; - - return ListRoutesResponse; - })(); - - v1.DeleteRouteRequest = (function() { - - /** - * Properties of a DeleteRouteRequest. - * @memberof google.cloud.datastream.v1 - * @interface IDeleteRouteRequest - * @property {string|null} [name] DeleteRouteRequest name - * @property {string|null} [requestId] DeleteRouteRequest requestId - */ - - /** - * Constructs a new DeleteRouteRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DeleteRouteRequest. - * @implements IDeleteRouteRequest - * @constructor - * @param {google.cloud.datastream.v1.IDeleteRouteRequest=} [properties] Properties to set - */ - function DeleteRouteRequest(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]]; - } - - /** - * DeleteRouteRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @instance - */ - DeleteRouteRequest.prototype.name = ""; - - /** - * DeleteRouteRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @instance - */ - DeleteRouteRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DeleteRouteRequest} DeleteRouteRequest instance - */ - DeleteRouteRequest.create = function create(properties) { - return new DeleteRouteRequest(properties); - }; - - /** - * Encodes the specified DeleteRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.DeleteRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteRouteRequest} message DeleteRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRouteRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DeleteRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1.IDeleteRouteRequest} message DeleteRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DeleteRouteRequest} DeleteRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DeleteRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DeleteRouteRequest} DeleteRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteRouteRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DeleteRouteRequest} DeleteRouteRequest - */ - DeleteRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DeleteRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1.DeleteRouteRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1.DeleteRouteRequest} message DeleteRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteRouteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DeleteRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DeleteRouteRequest"; - }; - - return DeleteRouteRequest; - })(); - - v1.GetRouteRequest = (function() { - - /** - * Properties of a GetRouteRequest. - * @memberof google.cloud.datastream.v1 - * @interface IGetRouteRequest - * @property {string|null} [name] GetRouteRequest name - */ - - /** - * Constructs a new GetRouteRequest. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GetRouteRequest. - * @implements IGetRouteRequest - * @constructor - * @param {google.cloud.datastream.v1.IGetRouteRequest=} [properties] Properties to set - */ - function GetRouteRequest(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]]; - } - - /** - * GetRouteRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @instance - */ - GetRouteRequest.prototype.name = ""; - - /** - * Creates a new GetRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1.IGetRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GetRouteRequest} GetRouteRequest instance - */ - GetRouteRequest.create = function create(properties) { - return new GetRouteRequest(properties); - }; - - /** - * Encodes the specified GetRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1.GetRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1.IGetRouteRequest} message GetRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRouteRequest.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 GetRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GetRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1.IGetRouteRequest} message GetRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GetRouteRequest} GetRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GetRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GetRouteRequest} GetRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRouteRequest.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 GetRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GetRouteRequest} GetRouteRequest - */ - GetRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GetRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1.GetRouteRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1.GetRouteRequest} message GetRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRouteRequest.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 GetRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @instance - * @returns {Object.} JSON object - */ - GetRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GetRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GetRouteRequest"; - }; - - return GetRouteRequest; - })(); - - v1.OracleProfile = (function() { - - /** - * Properties of an OracleProfile. - * @memberof google.cloud.datastream.v1 - * @interface IOracleProfile - * @property {string|null} [hostname] OracleProfile hostname - * @property {number|null} [port] OracleProfile port - * @property {string|null} [username] OracleProfile username - * @property {string|null} [password] OracleProfile password - * @property {string|null} [databaseService] OracleProfile databaseService - * @property {Object.|null} [connectionAttributes] OracleProfile connectionAttributes - * @property {google.cloud.datastream.v1.IOracleSslConfig|null} [oracleSslConfig] OracleProfile oracleSslConfig - * @property {google.cloud.datastream.v1.IOracleAsmConfig|null} [oracleAsmConfig] OracleProfile oracleAsmConfig - * @property {string|null} [secretManagerStoredPassword] OracleProfile secretManagerStoredPassword - */ - - /** - * Constructs a new OracleProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleProfile. - * @implements IOracleProfile - * @constructor - * @param {google.cloud.datastream.v1.IOracleProfile=} [properties] Properties to set - */ - function OracleProfile(properties) { - this.connectionAttributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.hostname = ""; - - /** - * OracleProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.port = 0; - - /** - * OracleProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.username = ""; - - /** - * OracleProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.password = ""; - - /** - * OracleProfile databaseService. - * @member {string} databaseService - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.databaseService = ""; - - /** - * OracleProfile connectionAttributes. - * @member {Object.} connectionAttributes - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.connectionAttributes = $util.emptyObject; - - /** - * OracleProfile oracleSslConfig. - * @member {google.cloud.datastream.v1.IOracleSslConfig|null|undefined} oracleSslConfig - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.oracleSslConfig = null; - - /** - * OracleProfile oracleAsmConfig. - * @member {google.cloud.datastream.v1.IOracleAsmConfig|null|undefined} oracleAsmConfig - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.oracleAsmConfig = null; - - /** - * OracleProfile secretManagerStoredPassword. - * @member {string} secretManagerStoredPassword - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - */ - OracleProfile.prototype.secretManagerStoredPassword = ""; - - /** - * Creates a new OracleProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {google.cloud.datastream.v1.IOracleProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleProfile} OracleProfile instance - */ - OracleProfile.create = function create(properties) { - return new OracleProfile(properties); - }; - - /** - * Encodes the specified OracleProfile message. Does not implicitly {@link google.cloud.datastream.v1.OracleProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {google.cloud.datastream.v1.IOracleProfile} message OracleProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.databaseService != null && Object.hasOwnProperty.call(message, "databaseService")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseService); - if (message.connectionAttributes != null && Object.hasOwnProperty.call(message, "connectionAttributes")) - for (var keys = Object.keys(message.connectionAttributes), 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.connectionAttributes[keys[i]]).ldelim(); - if (message.oracleSslConfig != null && Object.hasOwnProperty.call(message, "oracleSslConfig")) - $root.google.cloud.datastream.v1.OracleSslConfig.encode(message.oracleSslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oracleAsmConfig != null && Object.hasOwnProperty.call(message, "oracleAsmConfig")) - $root.google.cloud.datastream.v1.OracleAsmConfig.encode(message.oracleAsmConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.secretManagerStoredPassword != null && Object.hasOwnProperty.call(message, "secretManagerStoredPassword")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.secretManagerStoredPassword); - return writer; - }; - - /** - * Encodes the specified OracleProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {google.cloud.datastream.v1.IOracleProfile} message OracleProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleProfile} OracleProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleProfile(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.databaseService = reader.string(); - break; - } - case 6: { - if (message.connectionAttributes === $util.emptyObject) - message.connectionAttributes = {}; - 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.connectionAttributes[key] = value; - break; - } - case 7: { - message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.secretManagerStoredPassword = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleProfile} OracleProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.databaseService != null && message.hasOwnProperty("databaseService")) - if (!$util.isString(message.databaseService)) - return "databaseService: string expected"; - if (message.connectionAttributes != null && message.hasOwnProperty("connectionAttributes")) { - if (!$util.isObject(message.connectionAttributes)) - return "connectionAttributes: object expected"; - var key = Object.keys(message.connectionAttributes); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.connectionAttributes[key[i]])) - return "connectionAttributes: string{k:string} expected"; - } - if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) { - var error = $root.google.cloud.datastream.v1.OracleSslConfig.verify(message.oracleSslConfig); - if (error) - return "oracleSslConfig." + error; - } - if (message.oracleAsmConfig != null && message.hasOwnProperty("oracleAsmConfig")) { - var error = $root.google.cloud.datastream.v1.OracleAsmConfig.verify(message.oracleAsmConfig); - if (error) - return "oracleAsmConfig." + error; - } - if (message.secretManagerStoredPassword != null && message.hasOwnProperty("secretManagerStoredPassword")) - if (!$util.isString(message.secretManagerStoredPassword)) - return "secretManagerStoredPassword: string expected"; - return null; - }; - - /** - * Creates an OracleProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleProfile} OracleProfile - */ - OracleProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleProfile) - return object; - var message = new $root.google.cloud.datastream.v1.OracleProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.databaseService != null) - message.databaseService = String(object.databaseService); - if (object.connectionAttributes) { - if (typeof object.connectionAttributes !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleProfile.connectionAttributes: object expected"); - message.connectionAttributes = {}; - for (var keys = Object.keys(object.connectionAttributes), i = 0; i < keys.length; ++i) - message.connectionAttributes[keys[i]] = String(object.connectionAttributes[keys[i]]); - } - if (object.oracleSslConfig != null) { - if (typeof object.oracleSslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleProfile.oracleSslConfig: object expected"); - message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.fromObject(object.oracleSslConfig); - } - if (object.oracleAsmConfig != null) { - if (typeof object.oracleAsmConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleProfile.oracleAsmConfig: object expected"); - message.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.fromObject(object.oracleAsmConfig); - } - if (object.secretManagerStoredPassword != null) - message.secretManagerStoredPassword = String(object.secretManagerStoredPassword); - return message; - }; - - /** - * Creates a plain object from an OracleProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {google.cloud.datastream.v1.OracleProfile} message OracleProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.connectionAttributes = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.databaseService = ""; - object.oracleSslConfig = null; - object.oracleAsmConfig = null; - object.secretManagerStoredPassword = ""; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.databaseService != null && message.hasOwnProperty("databaseService")) - object.databaseService = message.databaseService; - var keys2; - if (message.connectionAttributes && (keys2 = Object.keys(message.connectionAttributes)).length) { - object.connectionAttributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.connectionAttributes[keys2[j]] = message.connectionAttributes[keys2[j]]; - } - if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) - object.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.toObject(message.oracleSslConfig, options); - if (message.oracleAsmConfig != null && message.hasOwnProperty("oracleAsmConfig")) - object.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.toObject(message.oracleAsmConfig, options); - if (message.secretManagerStoredPassword != null && message.hasOwnProperty("secretManagerStoredPassword")) - object.secretManagerStoredPassword = message.secretManagerStoredPassword; - return object; - }; - - /** - * Converts this OracleProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleProfile - * @instance - * @returns {Object.} JSON object - */ - OracleProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleProfile"; - }; - - return OracleProfile; - })(); - - v1.OracleAsmConfig = (function() { - - /** - * Properties of an OracleAsmConfig. - * @memberof google.cloud.datastream.v1 - * @interface IOracleAsmConfig - * @property {string|null} [hostname] OracleAsmConfig hostname - * @property {number|null} [port] OracleAsmConfig port - * @property {string|null} [username] OracleAsmConfig username - * @property {string|null} [password] OracleAsmConfig password - * @property {string|null} [asmService] OracleAsmConfig asmService - * @property {Object.|null} [connectionAttributes] OracleAsmConfig connectionAttributes - * @property {google.cloud.datastream.v1.IOracleSslConfig|null} [oracleSslConfig] OracleAsmConfig oracleSslConfig - */ - - /** - * Constructs a new OracleAsmConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleAsmConfig. - * @implements IOracleAsmConfig - * @constructor - * @param {google.cloud.datastream.v1.IOracleAsmConfig=} [properties] Properties to set - */ - function OracleAsmConfig(properties) { - this.connectionAttributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleAsmConfig hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.hostname = ""; - - /** - * OracleAsmConfig port. - * @member {number} port - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.port = 0; - - /** - * OracleAsmConfig username. - * @member {string} username - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.username = ""; - - /** - * OracleAsmConfig password. - * @member {string} password - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.password = ""; - - /** - * OracleAsmConfig asmService. - * @member {string} asmService - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.asmService = ""; - - /** - * OracleAsmConfig connectionAttributes. - * @member {Object.} connectionAttributes - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.connectionAttributes = $util.emptyObject; - - /** - * OracleAsmConfig oracleSslConfig. - * @member {google.cloud.datastream.v1.IOracleSslConfig|null|undefined} oracleSslConfig - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - */ - OracleAsmConfig.prototype.oracleSslConfig = null; - - /** - * Creates a new OracleAsmConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {google.cloud.datastream.v1.IOracleAsmConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig instance - */ - OracleAsmConfig.create = function create(properties) { - return new OracleAsmConfig(properties); - }; - - /** - * Encodes the specified OracleAsmConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {google.cloud.datastream.v1.IOracleAsmConfig} message OracleAsmConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleAsmConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.asmService != null && Object.hasOwnProperty.call(message, "asmService")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.asmService); - if (message.connectionAttributes != null && Object.hasOwnProperty.call(message, "connectionAttributes")) - for (var keys = Object.keys(message.connectionAttributes), 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.connectionAttributes[keys[i]]).ldelim(); - if (message.oracleSslConfig != null && Object.hasOwnProperty.call(message, "oracleSslConfig")) - $root.google.cloud.datastream.v1.OracleSslConfig.encode(message.oracleSslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleAsmConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {google.cloud.datastream.v1.IOracleAsmConfig} message OracleAsmConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleAsmConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleAsmConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleAsmConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleAsmConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.asmService = reader.string(); - break; - } - case 6: { - if (message.connectionAttributes === $util.emptyObject) - message.connectionAttributes = {}; - 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.connectionAttributes[key] = value; - break; - } - case 7: { - message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleAsmConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleAsmConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleAsmConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleAsmConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.asmService != null && message.hasOwnProperty("asmService")) - if (!$util.isString(message.asmService)) - return "asmService: string expected"; - if (message.connectionAttributes != null && message.hasOwnProperty("connectionAttributes")) { - if (!$util.isObject(message.connectionAttributes)) - return "connectionAttributes: object expected"; - var key = Object.keys(message.connectionAttributes); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.connectionAttributes[key[i]])) - return "connectionAttributes: string{k:string} expected"; - } - if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) { - var error = $root.google.cloud.datastream.v1.OracleSslConfig.verify(message.oracleSslConfig); - if (error) - return "oracleSslConfig." + error; - } - return null; - }; - - /** - * Creates an OracleAsmConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig - */ - OracleAsmConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleAsmConfig) - return object; - var message = new $root.google.cloud.datastream.v1.OracleAsmConfig(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.asmService != null) - message.asmService = String(object.asmService); - if (object.connectionAttributes) { - if (typeof object.connectionAttributes !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleAsmConfig.connectionAttributes: object expected"); - message.connectionAttributes = {}; - for (var keys = Object.keys(object.connectionAttributes), i = 0; i < keys.length; ++i) - message.connectionAttributes[keys[i]] = String(object.connectionAttributes[keys[i]]); - } - if (object.oracleSslConfig != null) { - if (typeof object.oracleSslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleAsmConfig.oracleSslConfig: object expected"); - message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.fromObject(object.oracleSslConfig); - } - return message; - }; - - /** - * Creates a plain object from an OracleAsmConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {google.cloud.datastream.v1.OracleAsmConfig} message OracleAsmConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleAsmConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.connectionAttributes = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.asmService = ""; - object.oracleSslConfig = null; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.asmService != null && message.hasOwnProperty("asmService")) - object.asmService = message.asmService; - var keys2; - if (message.connectionAttributes && (keys2 = Object.keys(message.connectionAttributes)).length) { - object.connectionAttributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.connectionAttributes[keys2[j]] = message.connectionAttributes[keys2[j]]; - } - if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) - object.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.toObject(message.oracleSslConfig, options); - return object; - }; - - /** - * Converts this OracleAsmConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @instance - * @returns {Object.} JSON object - */ - OracleAsmConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleAsmConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleAsmConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleAsmConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleAsmConfig"; - }; - - return OracleAsmConfig; - })(); - - v1.MysqlProfile = (function() { - - /** - * Properties of a MysqlProfile. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlProfile - * @property {string|null} [hostname] MysqlProfile hostname - * @property {number|null} [port] MysqlProfile port - * @property {string|null} [username] MysqlProfile username - * @property {string|null} [password] MysqlProfile password - * @property {google.cloud.datastream.v1.IMysqlSslConfig|null} [sslConfig] MysqlProfile sslConfig - */ - - /** - * Constructs a new MysqlProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlProfile. - * @implements IMysqlProfile - * @constructor - * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set - */ - function MysqlProfile(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]]; - } - - /** - * MysqlProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.hostname = ""; - - /** - * MysqlProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.port = 0; - - /** - * MysqlProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.username = ""; - - /** - * MysqlProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.password = ""; - - /** - * MysqlProfile sslConfig. - * @member {google.cloud.datastream.v1.IMysqlSslConfig|null|undefined} sslConfig - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.sslConfig = null; - - /** - * Creates a new MysqlProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile instance - */ - MysqlProfile.create = function create(properties) { - return new MysqlProfile(properties); - }; - - /** - * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) - $root.google.cloud.datastream.v1.MysqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { - var error = $root.google.cloud.datastream.v1.MysqlSslConfig.verify(message.sslConfig); - if (error) - return "sslConfig." + error; - } - return null; - }; - - /** - * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile - */ - MysqlProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlProfile) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.sslConfig != null) { - if (typeof object.sslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlProfile.sslConfig: object expected"); - message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.fromObject(object.sslConfig); - } - return message; - }; - - /** - * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1.MysqlProfile} message MysqlProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.sslConfig = null; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) - object.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.toObject(message.sslConfig, options); - return object; - }; - - /** - * Converts this MysqlProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlProfile - * @instance - * @returns {Object.} JSON object - */ - MysqlProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlProfile"; - }; - - return MysqlProfile; - })(); - - v1.PostgresqlProfile = (function() { - - /** - * Properties of a PostgresqlProfile. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlProfile - * @property {string|null} [hostname] PostgresqlProfile hostname - * @property {number|null} [port] PostgresqlProfile port - * @property {string|null} [username] PostgresqlProfile username - * @property {string|null} [password] PostgresqlProfile password - * @property {string|null} [database] PostgresqlProfile database - * @property {google.cloud.datastream.v1.IPostgresqlSslConfig|null} [sslConfig] PostgresqlProfile sslConfig - */ - - /** - * Constructs a new PostgresqlProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlProfile. - * @implements IPostgresqlProfile - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set - */ - function PostgresqlProfile(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]]; - } - - /** - * PostgresqlProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.hostname = ""; - - /** - * PostgresqlProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.port = 0; - - /** - * PostgresqlProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.username = ""; - - /** - * PostgresqlProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.password = ""; - - /** - * PostgresqlProfile database. - * @member {string} database - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.database = ""; - - /** - * PostgresqlProfile sslConfig. - * @member {google.cloud.datastream.v1.IPostgresqlSslConfig|null|undefined} sslConfig - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - */ - PostgresqlProfile.prototype.sslConfig = null; - - /** - * Creates a new PostgresqlProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile instance - */ - PostgresqlProfile.create = function create(properties) { - return new PostgresqlProfile(properties); - }; - - /** - * Encodes the specified PostgresqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); - if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) - $root.google.cloud.datastream.v1.PostgresqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostgresqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.database = reader.string(); - break; - } - case 7: { - message.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { - var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.verify(message.sslConfig); - if (error) - return "sslConfig." + error; - } - return null; - }; - - /** - * Creates a PostgresqlProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile - */ - PostgresqlProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlProfile) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.database != null) - message.database = String(object.database); - if (object.sslConfig != null) { - if (typeof object.sslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlProfile.sslConfig: object expected"); - message.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.fromObject(object.sslConfig); - } - return message; - }; - - /** - * Creates a plain object from a PostgresqlProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {google.cloud.datastream.v1.PostgresqlProfile} message PostgresqlProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.database = ""; - object.sslConfig = null; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) - object.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.toObject(message.sslConfig, options); - return object; - }; - - /** - * Converts this PostgresqlProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @instance - * @returns {Object.} JSON object - */ - PostgresqlProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlProfile"; - }; - - return PostgresqlProfile; - })(); - - v1.SqlServerProfile = (function() { - - /** - * Properties of a SqlServerProfile. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerProfile - * @property {string|null} [hostname] SqlServerProfile hostname - * @property {number|null} [port] SqlServerProfile port - * @property {string|null} [username] SqlServerProfile username - * @property {string|null} [password] SqlServerProfile password - * @property {string|null} [database] SqlServerProfile database - */ - - /** - * Constructs a new SqlServerProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerProfile. - * @implements ISqlServerProfile - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerProfile=} [properties] Properties to set - */ - function SqlServerProfile(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]]; - } - - /** - * SqlServerProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - */ - SqlServerProfile.prototype.hostname = ""; - - /** - * SqlServerProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - */ - SqlServerProfile.prototype.port = 0; - - /** - * SqlServerProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - */ - SqlServerProfile.prototype.username = ""; - - /** - * SqlServerProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - */ - SqlServerProfile.prototype.password = ""; - - /** - * SqlServerProfile database. - * @member {string} database - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - */ - SqlServerProfile.prototype.database = ""; - - /** - * Creates a new SqlServerProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {google.cloud.datastream.v1.ISqlServerProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile instance - */ - SqlServerProfile.create = function create(properties) { - return new SqlServerProfile(properties); - }; - - /** - * Encodes the specified SqlServerProfile message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {google.cloud.datastream.v1.ISqlServerProfile} message SqlServerProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); - return writer; - }; - - /** - * Encodes the specified SqlServerProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {google.cloud.datastream.v1.ISqlServerProfile} message SqlServerProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.database = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - return null; - }; - - /** - * Creates a SqlServerProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile - */ - SqlServerProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerProfile) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.database != null) - message.database = String(object.database); - return message; - }; - - /** - * Creates a plain object from a SqlServerProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {google.cloud.datastream.v1.SqlServerProfile} message SqlServerProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.database = ""; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - return object; - }; - - /** - * Converts this SqlServerProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @instance - * @returns {Object.} JSON object - */ - SqlServerProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerProfile"; - }; - - return SqlServerProfile; - })(); - - v1.GcsProfile = (function() { - - /** - * Properties of a GcsProfile. - * @memberof google.cloud.datastream.v1 - * @interface IGcsProfile - * @property {string|null} [bucket] GcsProfile bucket - * @property {string|null} [rootPath] GcsProfile rootPath - */ - - /** - * Constructs a new GcsProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GcsProfile. - * @implements IGcsProfile - * @constructor - * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set - */ - function GcsProfile(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]]; - } - - /** - * GcsProfile bucket. - * @member {string} bucket - * @memberof google.cloud.datastream.v1.GcsProfile - * @instance - */ - GcsProfile.prototype.bucket = ""; - - /** - * GcsProfile rootPath. - * @member {string} rootPath - * @memberof google.cloud.datastream.v1.GcsProfile - * @instance - */ - GcsProfile.prototype.rootPath = ""; - - /** - * Creates a new GcsProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile instance - */ - GcsProfile.create = function create(properties) { - return new GcsProfile(properties); - }; - - /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.rootPath != null && Object.hasOwnProperty.call(message, "rootPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rootPath); - return writer; - }; - - /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GcsProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - case 2: { - message.rootPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - if (!$util.isString(message.rootPath)) - return "rootPath: string expected"; - return null; - }; - - /** - * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile - */ - GcsProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GcsProfile) - return object; - var message = new $root.google.cloud.datastream.v1.GcsProfile(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.rootPath != null) - message.rootPath = String(object.rootPath); - return message; - }; - - /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {google.cloud.datastream.v1.GcsProfile} message GcsProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bucket = ""; - object.rootPath = ""; - } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - object.rootPath = message.rootPath; - return object; - }; - - /** - * Converts this GcsProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GcsProfile - * @instance - * @returns {Object.} JSON object - */ - GcsProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GcsProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GcsProfile"; - }; - - return GcsProfile; - })(); - - v1.BigQueryProfile = (function() { - - /** - * Properties of a BigQueryProfile. - * @memberof google.cloud.datastream.v1 - * @interface IBigQueryProfile - */ - - /** - * Constructs a new BigQueryProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BigQueryProfile. - * @implements IBigQueryProfile - * @constructor - * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set - */ - function BigQueryProfile(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 BigQueryProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile instance - */ - BigQueryProfile.create = function create(properties) { - return new BigQueryProfile(properties); - }; - - /** - * Encodes the specified BigQueryProfile message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified BigQueryProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a BigQueryProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile - */ - BigQueryProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryProfile) - return object; - return new $root.google.cloud.datastream.v1.BigQueryProfile(); - }; - - /** - * Creates a plain object from a BigQueryProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {google.cloud.datastream.v1.BigQueryProfile} message BigQueryProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryProfile.toObject = function toObject() { - return {}; - }; - - /** - * Converts this BigQueryProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @instance - * @returns {Object.} JSON object - */ - BigQueryProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryProfile"; - }; - - return BigQueryProfile; - })(); - - v1.StaticServiceIpConnectivity = (function() { - - /** - * Properties of a StaticServiceIpConnectivity. - * @memberof google.cloud.datastream.v1 - * @interface IStaticServiceIpConnectivity - */ - - /** - * Constructs a new StaticServiceIpConnectivity. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StaticServiceIpConnectivity. - * @implements IStaticServiceIpConnectivity - * @constructor - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set - */ - function StaticServiceIpConnectivity(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 StaticServiceIpConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity instance - */ - StaticServiceIpConnectivity.create = function create(properties) { - return new StaticServiceIpConnectivity(properties); - }; - - /** - * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StaticServiceIpConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StaticServiceIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StaticServiceIpConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StaticServiceIpConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StaticServiceIpConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StaticServiceIpConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StaticServiceIpConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - */ - StaticServiceIpConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StaticServiceIpConnectivity) - return object; - return new $root.google.cloud.datastream.v1.StaticServiceIpConnectivity(); - }; - - /** - * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1.StaticServiceIpConnectivity} message StaticServiceIpConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StaticServiceIpConnectivity.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StaticServiceIpConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @instance - * @returns {Object.} JSON object - */ - StaticServiceIpConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StaticServiceIpConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StaticServiceIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StaticServiceIpConnectivity"; - }; - - return StaticServiceIpConnectivity; - })(); - - v1.ForwardSshTunnelConnectivity = (function() { - - /** - * Properties of a ForwardSshTunnelConnectivity. - * @memberof google.cloud.datastream.v1 - * @interface IForwardSshTunnelConnectivity - * @property {string|null} [hostname] ForwardSshTunnelConnectivity hostname - * @property {string|null} [username] ForwardSshTunnelConnectivity username - * @property {number|null} [port] ForwardSshTunnelConnectivity port - * @property {string|null} [password] ForwardSshTunnelConnectivity password - * @property {string|null} [privateKey] ForwardSshTunnelConnectivity privateKey - */ - - /** - * Constructs a new ForwardSshTunnelConnectivity. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ForwardSshTunnelConnectivity. - * @implements IForwardSshTunnelConnectivity - * @constructor - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set - */ - function ForwardSshTunnelConnectivity(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]]; - } - - /** - * ForwardSshTunnelConnectivity hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.hostname = ""; - - /** - * ForwardSshTunnelConnectivity username. - * @member {string} username - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.username = ""; - - /** - * ForwardSshTunnelConnectivity port. - * @member {number} port - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.port = 0; - - /** - * ForwardSshTunnelConnectivity password. - * @member {string|null|undefined} password - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.password = null; - - /** - * ForwardSshTunnelConnectivity privateKey. - * @member {string|null|undefined} privateKey - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.privateKey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ForwardSshTunnelConnectivity authenticationMethod. - * @member {"password"|"privateKey"|undefined} authenticationMethod - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - Object.defineProperty(ForwardSshTunnelConnectivity.prototype, "authenticationMethod", { - get: $util.oneOfGetter($oneOfFields = ["password", "privateKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity instance - */ - ForwardSshTunnelConnectivity.create = function create(properties) { - return new ForwardSshTunnelConnectivity(properties); - }; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardSshTunnelConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.password); - if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.privateKey); - return writer; - }; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardSshTunnelConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardSshTunnelConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.username = reader.string(); - break; - } - case 3: { - message.port = reader.int32(); - break; - } - case 100: { - message.password = reader.string(); - break; - } - case 101: { - message.privateKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardSshTunnelConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardSshTunnelConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardSshTunnelConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.password != null && message.hasOwnProperty("password")) { - properties.authenticationMethod = 1; - if (!$util.isString(message.password)) - return "password: string expected"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - if (properties.authenticationMethod === 1) - return "authenticationMethod: multiple values"; - properties.authenticationMethod = 1; - if (!$util.isString(message.privateKey)) - return "privateKey: string expected"; - } - return null; - }; - - /** - * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - */ - ForwardSshTunnelConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity) - return object; - var message = new $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.username != null) - message.username = String(object.username); - if (object.port != null) - message.port = object.port | 0; - if (object.password != null) - message.password = String(object.password); - if (object.privateKey != null) - message.privateKey = String(object.privateKey); - return message; - }; - - /** - * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardSshTunnelConnectivity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.username = ""; - object.port = 0; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.password != null && message.hasOwnProperty("password")) { - object.password = message.password; - if (options.oneofs) - object.authenticationMethod = "password"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - object.privateKey = message.privateKey; - if (options.oneofs) - object.authenticationMethod = "privateKey"; - } - return object; - }; - - /** - * Converts this ForwardSshTunnelConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - * @returns {Object.} JSON object - */ - ForwardSshTunnelConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardSshTunnelConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardSshTunnelConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ForwardSshTunnelConnectivity"; - }; - - return ForwardSshTunnelConnectivity; - })(); - - v1.VpcPeeringConfig = (function() { - - /** - * Properties of a VpcPeeringConfig. - * @memberof google.cloud.datastream.v1 - * @interface IVpcPeeringConfig - * @property {string|null} [vpc] VpcPeeringConfig vpc - * @property {string|null} [subnet] VpcPeeringConfig subnet - */ - - /** - * Constructs a new VpcPeeringConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a VpcPeeringConfig. - * @implements IVpcPeeringConfig - * @constructor - * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set - */ - function VpcPeeringConfig(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]]; - } - - /** - * VpcPeeringConfig vpc. - * @member {string} vpc - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.vpc = ""; - - /** - * VpcPeeringConfig subnet. - * @member {string} subnet - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.subnet = ""; - - /** - * Creates a new VpcPeeringConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig instance - */ - VpcPeeringConfig.create = function create(properties) { - return new VpcPeeringConfig(properties); - }; - - /** - * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcPeeringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpc); - if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnet); - return writer; - }; - - /** - * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcPeeringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcPeeringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.VpcPeeringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.vpc = reader.string(); - break; - } - case 2: { - message.subnet = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcPeeringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcPeeringConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcPeeringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vpc != null && message.hasOwnProperty("vpc")) - if (!$util.isString(message.vpc)) - return "vpc: string expected"; - if (message.subnet != null && message.hasOwnProperty("subnet")) - if (!$util.isString(message.subnet)) - return "subnet: string expected"; - return null; - }; - - /** - * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig - */ - VpcPeeringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.VpcPeeringConfig) - return object; - var message = new $root.google.cloud.datastream.v1.VpcPeeringConfig(); - if (object.vpc != null) - message.vpc = String(object.vpc); - if (object.subnet != null) - message.subnet = String(object.subnet); - return message; - }; - - /** - * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1.VpcPeeringConfig} message VpcPeeringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcPeeringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vpc = ""; - object.subnet = ""; - } - if (message.vpc != null && message.hasOwnProperty("vpc")) - object.vpc = message.vpc; - if (message.subnet != null && message.hasOwnProperty("subnet")) - object.subnet = message.subnet; - return object; - }; - - /** - * Converts this VpcPeeringConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @instance - * @returns {Object.} JSON object - */ - VpcPeeringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcPeeringConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcPeeringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.VpcPeeringConfig"; - }; - - return VpcPeeringConfig; - })(); - - v1.PrivateConnection = (function() { - - /** - * Properties of a PrivateConnection. - * @memberof google.cloud.datastream.v1 - * @interface IPrivateConnection - * @property {string|null} [name] PrivateConnection name - * @property {google.protobuf.ITimestamp|null} [createTime] PrivateConnection createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateConnection updateTime - * @property {Object.|null} [labels] PrivateConnection labels - * @property {string|null} [displayName] PrivateConnection displayName - * @property {google.cloud.datastream.v1.PrivateConnection.State|null} [state] PrivateConnection state - * @property {google.cloud.datastream.v1.IError|null} [error] PrivateConnection error - * @property {google.cloud.datastream.v1.IVpcPeeringConfig|null} [vpcPeeringConfig] PrivateConnection vpcPeeringConfig - */ - - /** - * Constructs a new PrivateConnection. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PrivateConnection. - * @implements IPrivateConnection - * @constructor - * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set - */ - function PrivateConnection(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]]; - } - - /** - * PrivateConnection name. - * @member {string} name - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.name = ""; - - /** - * PrivateConnection createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.createTime = null; - - /** - * PrivateConnection updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.updateTime = null; - - /** - * PrivateConnection labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.labels = $util.emptyObject; - - /** - * PrivateConnection displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.displayName = ""; - - /** - * PrivateConnection state. - * @member {google.cloud.datastream.v1.PrivateConnection.State} state - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.state = 0; - - /** - * PrivateConnection error. - * @member {google.cloud.datastream.v1.IError|null|undefined} error - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.error = null; - - /** - * PrivateConnection vpcPeeringConfig. - * @member {google.cloud.datastream.v1.IVpcPeeringConfig|null|undefined} vpcPeeringConfig - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.vpcPeeringConfig = null; - - /** - * Creates a new PrivateConnection instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection instance - */ - PrivateConnection.create = function create(properties) { - return new PrivateConnection(properties); - }; - - /** - * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnection.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.cloud.datastream.v1.Error.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.vpcPeeringConfig != null && Object.hasOwnProperty.call(message, "vpcPeeringConfig")) - $root.google.cloud.datastream.v1.VpcPeeringConfig.encode(message.vpcPeeringConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnection.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PrivateConnection(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.error = $root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32()); - break; - } - case 100: { - message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateConnection message. - * @function verify - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateConnection.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.error != null && message.hasOwnProperty("error")) { - var error = $root.google.cloud.datastream.v1.Error.verify(message.error); - if (error) - return "error." + error; - } - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { - var error = $root.google.cloud.datastream.v1.VpcPeeringConfig.verify(message.vpcPeeringConfig); - if (error) - return "vpcPeeringConfig." + error; - } - return null; - }; - - /** - * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection - */ - PrivateConnection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PrivateConnection) - return object; - var message = new $root.google.cloud.datastream.v1.PrivateConnection(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - 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 "CREATING": - case 1: - message.state = 1; - break; - case "CREATED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "FAILED_TO_DELETE": - case 5: - message.state = 5; - break; - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.error: object expected"); - message.error = $root.google.cloud.datastream.v1.Error.fromObject(object.error); - } - if (object.vpcPeeringConfig != null) { - if (typeof object.vpcPeeringConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.vpcPeeringConfig: object expected"); - message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.fromObject(object.vpcPeeringConfig); - } - return message; - }; - - /** - * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1.PrivateConnection} message PrivateConnection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateConnection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.error = null; - object.vpcPeeringConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] : message.state; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.cloud.datastream.v1.Error.toObject(message.error, options); - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) - object.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.toObject(message.vpcPeeringConfig, options); - return object; - }; - - /** - * Converts this PrivateConnection to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - * @returns {Object.} JSON object - */ - PrivateConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateConnection - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PrivateConnection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnection"; - }; - - /** - * State enum. - * @name google.cloud.datastream.v1.PrivateConnection.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} CREATED=2 CREATED value - * @property {number} FAILED=3 FAILED value - * @property {number} DELETING=4 DELETING value - * @property {number} FAILED_TO_DELETE=5 FAILED_TO_DELETE value - */ - PrivateConnection.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "CREATED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "FAILED_TO_DELETE"] = 5; - return values; - })(); - - return PrivateConnection; - })(); - - v1.PrivateConnectivity = (function() { - - /** - * Properties of a PrivateConnectivity. - * @memberof google.cloud.datastream.v1 - * @interface IPrivateConnectivity - * @property {string|null} [privateConnection] PrivateConnectivity privateConnection - */ - - /** - * Constructs a new PrivateConnectivity. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PrivateConnectivity. - * @implements IPrivateConnectivity - * @constructor - * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set - */ - function PrivateConnectivity(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]]; - } - - /** - * PrivateConnectivity privateConnection. - * @member {string} privateConnection - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @instance - */ - PrivateConnectivity.prototype.privateConnection = ""; - - /** - * Creates a new PrivateConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity instance - */ - PrivateConnectivity.create = function create(properties) { - return new PrivateConnectivity(properties); - }; - - /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.privateConnection); - return writer; - }; - - /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PrivateConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.privateConnection = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - if (!$util.isString(message.privateConnection)) - return "privateConnection: string expected"; - return null; - }; - - /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity - */ - PrivateConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PrivateConnectivity) - return object; - var message = new $root.google.cloud.datastream.v1.PrivateConnectivity(); - if (object.privateConnection != null) - message.privateConnection = String(object.privateConnection); - return message; - }; - - /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1.PrivateConnectivity} message PrivateConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateConnectivity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.privateConnection = ""; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - object.privateConnection = message.privateConnection; - return object; - }; - - /** - * Converts this PrivateConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @instance - * @returns {Object.} JSON object - */ - PrivateConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PrivateConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnectivity"; - }; - - return PrivateConnectivity; - })(); - - v1.Route = (function() { - - /** - * Properties of a Route. - * @memberof google.cloud.datastream.v1 - * @interface IRoute - * @property {string|null} [name] Route name - * @property {google.protobuf.ITimestamp|null} [createTime] Route createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Route updateTime - * @property {Object.|null} [labels] Route labels - * @property {string|null} [displayName] Route displayName - * @property {string|null} [destinationAddress] Route destinationAddress - * @property {number|null} [destinationPort] Route destinationPort - */ - - /** - * Constructs a new Route. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Route. - * @implements IRoute - * @constructor - * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set - */ - function Route(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]]; - } - - /** - * Route name. - * @member {string} name - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.name = ""; - - /** - * Route createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.createTime = null; - - /** - * Route updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.updateTime = null; - - /** - * Route labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.labels = $util.emptyObject; - - /** - * Route displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.displayName = ""; - - /** - * Route destinationAddress. - * @member {string} destinationAddress - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.destinationAddress = ""; - - /** - * Route destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.datastream.v1.Route - * @instance - */ - Route.prototype.destinationPort = 0; - - /** - * Creates a new Route instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Route} Route instance - */ - Route.create = function create(properties) { - return new Route(properties); - }; - - /** - * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Route.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.destinationAddress != null && Object.hasOwnProperty.call(message, "destinationAddress")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.destinationAddress); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.destinationPort); - return writer; - }; - - /** - * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Route.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Route message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Route} Route - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Route.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Route(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.destinationAddress = reader.string(); - break; - } - case 7: { - message.destinationPort = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Route message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Route} Route - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Route.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Route message. - * @function verify - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Route.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - if (!$util.isString(message.destinationAddress)) - return "destinationAddress: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - return null; - }; - - /** - * Creates a Route message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Route} Route - */ - Route.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Route) - return object; - var message = new $root.google.cloud.datastream.v1.Route(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Route.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Route.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.Route.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.destinationAddress != null) - message.destinationAddress = String(object.destinationAddress); - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - return message; - }; - - /** - * Creates a plain object from a Route message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {google.cloud.datastream.v1.Route} message Route - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Route.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.destinationAddress = ""; - object.destinationPort = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - object.destinationAddress = message.destinationAddress; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - return object; - }; - - /** - * Converts this Route to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Route - * @instance - * @returns {Object.} JSON object - */ - Route.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Route - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Route - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Route.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Route"; - }; - - return Route; - })(); - - v1.MysqlSslConfig = (function() { - - /** - * Properties of a MysqlSslConfig. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlSslConfig - * @property {string|null} [clientKey] MysqlSslConfig clientKey - * @property {boolean|null} [clientKeySet] MysqlSslConfig clientKeySet - * @property {string|null} [clientCertificate] MysqlSslConfig clientCertificate - * @property {boolean|null} [clientCertificateSet] MysqlSslConfig clientCertificateSet - * @property {string|null} [caCertificate] MysqlSslConfig caCertificate - * @property {boolean|null} [caCertificateSet] MysqlSslConfig caCertificateSet - */ - - /** - * Constructs a new MysqlSslConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlSslConfig. - * @implements IMysqlSslConfig - * @constructor - * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set - */ - function MysqlSslConfig(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]]; - } - - /** - * MysqlSslConfig clientKey. - * @member {string} clientKey - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientKey = ""; - - /** - * MysqlSslConfig clientKeySet. - * @member {boolean} clientKeySet - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientKeySet = false; - - /** - * MysqlSslConfig clientCertificate. - * @member {string} clientCertificate - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientCertificate = ""; - - /** - * MysqlSslConfig clientCertificateSet. - * @member {boolean} clientCertificateSet - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientCertificateSet = false; - - /** - * MysqlSslConfig caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificate = ""; - - /** - * MysqlSslConfig caCertificateSet. - * @member {boolean} caCertificateSet - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificateSet = false; - - /** - * Creates a new MysqlSslConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig instance - */ - MysqlSslConfig.create = function create(properties) { - return new MysqlSslConfig(properties); - }; - - /** - * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSslConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientKey); - if (message.clientKeySet != null && Object.hasOwnProperty.call(message, "clientKeySet")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clientKeySet); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientCertificate); - if (message.clientCertificateSet != null && Object.hasOwnProperty.call(message, "clientCertificateSet")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.clientCertificateSet); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.caCertificate); - if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.caCertificateSet); - return writer; - }; - - /** - * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSslConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlSslConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clientKey = reader.string(); - break; - } - case 2: { - message.clientKeySet = reader.bool(); - break; - } - case 3: { - message.clientCertificate = reader.string(); - break; - } - case 4: { - message.clientCertificateSet = reader.bool(); - break; - } - case 5: { - message.caCertificate = reader.string(); - break; - } - case 6: { - message.caCertificateSet = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSslConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlSslConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlSslConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - if (typeof message.clientKeySet !== "boolean") - return "clientKeySet: boolean expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - if (typeof message.clientCertificateSet !== "boolean") - return "clientCertificateSet: boolean expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - if (typeof message.caCertificateSet !== "boolean") - return "caCertificateSet: boolean expected"; - return null; - }; - - /** - * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig - */ - MysqlSslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSslConfig) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlSslConfig(); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - if (object.clientKeySet != null) - message.clientKeySet = Boolean(object.clientKeySet); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientCertificateSet != null) - message.clientCertificateSet = Boolean(object.clientCertificateSet); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - if (object.caCertificateSet != null) - message.caCertificateSet = Boolean(object.caCertificateSet); - return message; - }; - - /** - * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1.MysqlSslConfig} message MysqlSslConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlSslConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientKey = ""; - object.clientKeySet = false; - object.clientCertificate = ""; - object.clientCertificateSet = false; - object.caCertificate = ""; - object.caCertificateSet = false; - } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - object.clientKeySet = message.clientKeySet; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - object.clientCertificateSet = message.clientCertificateSet; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - object.caCertificateSet = message.caCertificateSet; - return object; - }; - - /** - * Converts this MysqlSslConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - * @returns {Object.} JSON object - */ - MysqlSslConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlSslConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSslConfig"; - }; - - return MysqlSslConfig; - })(); - - v1.OracleSslConfig = (function() { - - /** - * Properties of an OracleSslConfig. - * @memberof google.cloud.datastream.v1 - * @interface IOracleSslConfig - * @property {string|null} [caCertificate] OracleSslConfig caCertificate - * @property {boolean|null} [caCertificateSet] OracleSslConfig caCertificateSet - */ - - /** - * Constructs a new OracleSslConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleSslConfig. - * @implements IOracleSslConfig - * @constructor - * @param {google.cloud.datastream.v1.IOracleSslConfig=} [properties] Properties to set - */ - function OracleSslConfig(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]]; - } - - /** - * OracleSslConfig caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @instance - */ - OracleSslConfig.prototype.caCertificate = ""; - - /** - * OracleSslConfig caCertificateSet. - * @member {boolean} caCertificateSet - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @instance - */ - OracleSslConfig.prototype.caCertificateSet = false; - - /** - * Creates a new OracleSslConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSslConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig instance - */ - OracleSslConfig.create = function create(properties) { - return new OracleSslConfig(properties); - }; - - /** - * Encodes the specified OracleSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSslConfig} message OracleSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSslConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificate); - if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caCertificateSet); - return writer; - }; - - /** - * Encodes the specified OracleSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSslConfig} message OracleSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSslConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleSslConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSslConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSslConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.caCertificate = reader.string(); - break; - } - case 2: { - message.caCertificateSet = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleSslConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSslConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleSslConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleSslConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - if (typeof message.caCertificateSet !== "boolean") - return "caCertificateSet: boolean expected"; - return null; - }; - - /** - * Creates an OracleSslConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig - */ - OracleSslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSslConfig) - return object; - var message = new $root.google.cloud.datastream.v1.OracleSslConfig(); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - if (object.caCertificateSet != null) - message.caCertificateSet = Boolean(object.caCertificateSet); - return message; - }; - - /** - * Creates a plain object from an OracleSslConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {google.cloud.datastream.v1.OracleSslConfig} message OracleSslConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleSslConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.caCertificate = ""; - object.caCertificateSet = false; - } - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - object.caCertificateSet = message.caCertificateSet; - return object; - }; - - /** - * Converts this OracleSslConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @instance - * @returns {Object.} JSON object - */ - OracleSslConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSslConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSslConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSslConfig"; - }; - - return OracleSslConfig; - })(); - - v1.PostgresqlSslConfig = (function() { - - /** - * Properties of a PostgresqlSslConfig. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlSslConfig - * @property {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null} [serverVerification] PostgresqlSslConfig serverVerification - * @property {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null} [serverAndClientVerification] PostgresqlSslConfig serverAndClientVerification - */ - - /** - * Constructs a new PostgresqlSslConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlSslConfig. - * @implements IPostgresqlSslConfig - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlSslConfig=} [properties] Properties to set - */ - function PostgresqlSslConfig(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]]; - } - - /** - * PostgresqlSslConfig serverVerification. - * @member {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null|undefined} serverVerification - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @instance - */ - PostgresqlSslConfig.prototype.serverVerification = null; - - /** - * PostgresqlSslConfig serverAndClientVerification. - * @member {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null|undefined} serverAndClientVerification - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @instance - */ - PostgresqlSslConfig.prototype.serverAndClientVerification = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PostgresqlSslConfig encryptionSetting. - * @member {"serverVerification"|"serverAndClientVerification"|undefined} encryptionSetting - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @instance - */ - Object.defineProperty(PostgresqlSslConfig.prototype, "encryptionSetting", { - get: $util.oneOfGetter($oneOfFields = ["serverVerification", "serverAndClientVerification"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PostgresqlSslConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSslConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig instance - */ - PostgresqlSslConfig.create = function create(properties) { - return new PostgresqlSslConfig(properties); - }; - - /** - * Encodes the specified PostgresqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSslConfig} message PostgresqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSslConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serverVerification != null && Object.hasOwnProperty.call(message, "serverVerification")) - $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.encode(message.serverVerification, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.serverAndClientVerification != null && Object.hasOwnProperty.call(message, "serverAndClientVerification")) - $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.encode(message.serverAndClientVerification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostgresqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSslConfig} message PostgresqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlSslConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSslConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.decode(reader, reader.uint32()); - break; - } - case 2: { - message.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlSslConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSslConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlSslConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlSslConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.serverVerification != null && message.hasOwnProperty("serverVerification")) { - properties.encryptionSetting = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify(message.serverVerification); - if (error) - return "serverVerification." + error; - } - } - if (message.serverAndClientVerification != null && message.hasOwnProperty("serverAndClientVerification")) { - if (properties.encryptionSetting === 1) - return "encryptionSetting: multiple values"; - properties.encryptionSetting = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify(message.serverAndClientVerification); - if (error) - return "serverAndClientVerification." + error; - } - } - return null; - }; - - /** - * Creates a PostgresqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig - */ - PostgresqlSslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig(); - if (object.serverVerification != null) { - if (typeof object.serverVerification !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSslConfig.serverVerification: object expected"); - message.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.fromObject(object.serverVerification); - } - if (object.serverAndClientVerification != null) { - if (typeof object.serverAndClientVerification !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSslConfig.serverAndClientVerification: object expected"); - message.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.fromObject(object.serverAndClientVerification); - } - return message; - }; - - /** - * Creates a plain object from a PostgresqlSslConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig} message PostgresqlSslConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlSslConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.serverVerification != null && message.hasOwnProperty("serverVerification")) { - object.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.toObject(message.serverVerification, options); - if (options.oneofs) - object.encryptionSetting = "serverVerification"; - } - if (message.serverAndClientVerification != null && message.hasOwnProperty("serverAndClientVerification")) { - object.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.toObject(message.serverAndClientVerification, options); - if (options.oneofs) - object.encryptionSetting = "serverAndClientVerification"; - } - return object; - }; - - /** - * Converts this PostgresqlSslConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @instance - * @returns {Object.} JSON object - */ - PostgresqlSslConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlSslConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig"; - }; - - PostgresqlSslConfig.ServerVerification = (function() { - - /** - * Properties of a ServerVerification. - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @interface IServerVerification - * @property {string|null} [caCertificate] ServerVerification caCertificate - */ - - /** - * Constructs a new ServerVerification. - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @classdesc Represents a ServerVerification. - * @implements IServerVerification - * @constructor - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification=} [properties] Properties to set - */ - function ServerVerification(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]]; - } - - /** - * ServerVerification caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @instance - */ - ServerVerification.prototype.caCertificate = ""; - - /** - * Creates a new ServerVerification instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification instance - */ - ServerVerification.create = function create(properties) { - return new ServerVerification(properties); - }; - - /** - * Encodes the specified ServerVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification} message ServerVerification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerVerification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificate); - return writer; - }; - - /** - * Encodes the specified ServerVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification} message ServerVerification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerVerification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerVerification message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerVerification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.caCertificate = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerVerification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerVerification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerVerification message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerVerification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - return null; - }; - - /** - * Creates a ServerVerification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification - */ - ServerVerification.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification(); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - return message; - }; - - /** - * Creates a plain object from a ServerVerification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} message ServerVerification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerVerification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.caCertificate = ""; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - return object; - }; - - /** - * Converts this ServerVerification to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @instance - * @returns {Object.} JSON object - */ - ServerVerification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerVerification - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification"; - }; - - return ServerVerification; - })(); - - PostgresqlSslConfig.ServerAndClientVerification = (function() { - - /** - * Properties of a ServerAndClientVerification. - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @interface IServerAndClientVerification - * @property {string|null} [clientCertificate] ServerAndClientVerification clientCertificate - * @property {string|null} [clientKey] ServerAndClientVerification clientKey - * @property {string|null} [caCertificate] ServerAndClientVerification caCertificate - */ - - /** - * Constructs a new ServerAndClientVerification. - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig - * @classdesc Represents a ServerAndClientVerification. - * @implements IServerAndClientVerification - * @constructor - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification=} [properties] Properties to set - */ - function ServerAndClientVerification(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]]; - } - - /** - * ServerAndClientVerification clientCertificate. - * @member {string} clientCertificate - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @instance - */ - ServerAndClientVerification.prototype.clientCertificate = ""; - - /** - * ServerAndClientVerification clientKey. - * @member {string} clientKey - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @instance - */ - ServerAndClientVerification.prototype.clientKey = ""; - - /** - * ServerAndClientVerification caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @instance - */ - ServerAndClientVerification.prototype.caCertificate = ""; - - /** - * Creates a new ServerAndClientVerification instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification instance - */ - ServerAndClientVerification.create = function create(properties) { - return new ServerAndClientVerification(properties); - }; - - /** - * Encodes the specified ServerAndClientVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification} message ServerAndClientVerification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerAndClientVerification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientCertificate); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientKey); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.caCertificate); - return writer; - }; - - /** - * Encodes the specified ServerAndClientVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification} message ServerAndClientVerification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerAndClientVerification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerAndClientVerification message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerAndClientVerification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clientCertificate = reader.string(); - break; - } - case 2: { - message.clientKey = reader.string(); - break; - } - case 3: { - message.caCertificate = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerAndClientVerification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerAndClientVerification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerAndClientVerification message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerAndClientVerification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - return null; - }; - - /** - * Creates a ServerAndClientVerification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification - */ - ServerAndClientVerification.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification(); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - return message; - }; - - /** - * Creates a plain object from a ServerAndClientVerification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} message ServerAndClientVerification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerAndClientVerification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientCertificate = ""; - object.clientKey = ""; - object.caCertificate = ""; - } - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - return object; - }; - - /** - * Converts this ServerAndClientVerification to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @instance - * @returns {Object.} JSON object - */ - ServerAndClientVerification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerAndClientVerification - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerAndClientVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification"; - }; - - return ServerAndClientVerification; - })(); - - return PostgresqlSslConfig; - })(); - - v1.ConnectionProfile = (function() { - - /** - * Properties of a ConnectionProfile. - * @memberof google.cloud.datastream.v1 - * @interface IConnectionProfile - * @property {string|null} [name] ConnectionProfile name - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime - * @property {Object.|null} [labels] ConnectionProfile labels - * @property {string|null} [displayName] ConnectionProfile displayName - * @property {google.cloud.datastream.v1.IOracleProfile|null} [oracleProfile] ConnectionProfile oracleProfile - * @property {google.cloud.datastream.v1.IGcsProfile|null} [gcsProfile] ConnectionProfile gcsProfile - * @property {google.cloud.datastream.v1.IMysqlProfile|null} [mysqlProfile] ConnectionProfile mysqlProfile - * @property {google.cloud.datastream.v1.IBigQueryProfile|null} [bigqueryProfile] ConnectionProfile bigqueryProfile - * @property {google.cloud.datastream.v1.IPostgresqlProfile|null} [postgresqlProfile] ConnectionProfile postgresqlProfile - * @property {google.cloud.datastream.v1.ISqlServerProfile|null} [sqlServerProfile] ConnectionProfile sqlServerProfile - * @property {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null} [staticServiceIpConnectivity] ConnectionProfile staticServiceIpConnectivity - * @property {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null} [forwardSshConnectivity] ConnectionProfile forwardSshConnectivity - * @property {google.cloud.datastream.v1.IPrivateConnectivity|null} [privateConnectivity] ConnectionProfile privateConnectivity - */ - - /** - * Constructs a new ConnectionProfile. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ConnectionProfile. - * @implements IConnectionProfile - * @constructor - * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set - */ - function ConnectionProfile(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]]; - } - - /** - * ConnectionProfile name. - * @member {string} name - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.name = ""; - - /** - * ConnectionProfile createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.createTime = null; - - /** - * ConnectionProfile updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.updateTime = null; - - /** - * ConnectionProfile labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.labels = $util.emptyObject; - - /** - * ConnectionProfile displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.displayName = ""; - - /** - * ConnectionProfile oracleProfile. - * @member {google.cloud.datastream.v1.IOracleProfile|null|undefined} oracleProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.oracleProfile = null; - - /** - * ConnectionProfile gcsProfile. - * @member {google.cloud.datastream.v1.IGcsProfile|null|undefined} gcsProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.gcsProfile = null; - - /** - * ConnectionProfile mysqlProfile. - * @member {google.cloud.datastream.v1.IMysqlProfile|null|undefined} mysqlProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.mysqlProfile = null; - - /** - * ConnectionProfile bigqueryProfile. - * @member {google.cloud.datastream.v1.IBigQueryProfile|null|undefined} bigqueryProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.bigqueryProfile = null; - - /** - * ConnectionProfile postgresqlProfile. - * @member {google.cloud.datastream.v1.IPostgresqlProfile|null|undefined} postgresqlProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.postgresqlProfile = null; - - /** - * ConnectionProfile sqlServerProfile. - * @member {google.cloud.datastream.v1.ISqlServerProfile|null|undefined} sqlServerProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.sqlServerProfile = null; - - /** - * ConnectionProfile staticServiceIpConnectivity. - * @member {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null|undefined} staticServiceIpConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.staticServiceIpConnectivity = null; - - /** - * ConnectionProfile forwardSshConnectivity. - * @member {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null|undefined} forwardSshConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.forwardSshConnectivity = null; - - /** - * ConnectionProfile privateConnectivity. - * @member {google.cloud.datastream.v1.IPrivateConnectivity|null|undefined} privateConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.privateConnectivity = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConnectionProfile profile. - * @member {"oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"|"sqlServerProfile"|undefined} profile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - Object.defineProperty(ConnectionProfile.prototype, "profile", { - get: $util.oneOfGetter($oneOfFields = ["oracleProfile", "gcsProfile", "mysqlProfile", "bigqueryProfile", "postgresqlProfile", "sqlServerProfile"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ConnectionProfile connectivity. - * @member {"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"|undefined} connectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - Object.defineProperty(ConnectionProfile.prototype, "connectivity", { - get: $util.oneOfGetter($oneOfFields = ["staticServiceIpConnectivity", "forwardSshConnectivity", "privateConnectivity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConnectionProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile instance - */ - ConnectionProfile.create = function create(properties) { - return new ConnectionProfile(properties); - }; - - /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionProfile.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.oracleProfile != null && Object.hasOwnProperty.call(message, "oracleProfile")) - $root.google.cloud.datastream.v1.OracleProfile.encode(message.oracleProfile, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.gcsProfile != null && Object.hasOwnProperty.call(message, "gcsProfile")) - $root.google.cloud.datastream.v1.GcsProfile.encode(message.gcsProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.mysqlProfile != null && Object.hasOwnProperty.call(message, "mysqlProfile")) - $root.google.cloud.datastream.v1.MysqlProfile.encode(message.mysqlProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.bigqueryProfile != null && Object.hasOwnProperty.call(message, "bigqueryProfile")) - $root.google.cloud.datastream.v1.BigQueryProfile.encode(message.bigqueryProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.postgresqlProfile != null && Object.hasOwnProperty.call(message, "postgresqlProfile")) - $root.google.cloud.datastream.v1.PostgresqlProfile.encode(message.postgresqlProfile, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.sqlServerProfile != null && Object.hasOwnProperty.call(message, "sqlServerProfile")) - $root.google.cloud.datastream.v1.SqlServerProfile.encode(message.sqlServerProfile, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.staticServiceIpConnectivity != null && Object.hasOwnProperty.call(message, "staticServiceIpConnectivity")) - $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.encode(message.staticServiceIpConnectivity, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.forwardSshConnectivity != null && Object.hasOwnProperty.call(message, "forwardSshConnectivity")) - $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.encode(message.forwardSshConnectivity, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.privateConnectivity != null && Object.hasOwnProperty.call(message, "privateConnectivity")) - $root.google.cloud.datastream.v1.PrivateConnectivity.encode(message.privateConnectivity, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ConnectionProfile(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 100: { - message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.decode(reader, reader.uint32()); - break; - } - case 101: { - message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.decode(reader, reader.uint32()); - break; - } - case 102: { - message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.decode(reader, reader.uint32()); - break; - } - case 103: { - message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.decode(reader, reader.uint32()); - break; - } - case 104: { - message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.decode(reader, reader.uint32()); - break; - } - case 105: { - message.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.decode(reader, reader.uint32()); - break; - } - case 200: { - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.decode(reader, reader.uint32()); - break; - } - case 201: { - message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.decode(reader, reader.uint32()); - break; - } - case 202: { - message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionProfile message. - * @function verify - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.OracleProfile.verify(message.oracleProfile); - if (error) - return "oracleProfile." + error; - } - } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.GcsProfile.verify(message.gcsProfile); - if (error) - return "gcsProfile." + error; - } - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlProfile.verify(message.mysqlProfile); - if (error) - return "mysqlProfile." + error; - } - } - if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryProfile.verify(message.bigqueryProfile); - if (error) - return "bigqueryProfile." + error; - } - } - if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlProfile.verify(message.postgresqlProfile); - if (error) - return "postgresqlProfile." + error; - } - } - if (message.sqlServerProfile != null && message.hasOwnProperty("sqlServerProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerProfile.verify(message.sqlServerProfile); - if (error) - return "sqlServerProfile." + error; - } - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.verify(message.staticServiceIpConnectivity); - if (error) - return "staticServiceIpConnectivity." + error; - } - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify(message.forwardSshConnectivity); - if (error) - return "forwardSshConnectivity." + error; - } - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.PrivateConnectivity.verify(message.privateConnectivity); - if (error) - return "privateConnectivity." + error; - } - } - return null; - }; - - /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile - */ - ConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ConnectionProfile) - return object; - var message = new $root.google.cloud.datastream.v1.ConnectionProfile(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.oracleProfile != null) { - if (typeof object.oracleProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.oracleProfile: object expected"); - message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.fromObject(object.oracleProfile); - } - if (object.gcsProfile != null) { - if (typeof object.gcsProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.gcsProfile: object expected"); - message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.fromObject(object.gcsProfile); - } - if (object.mysqlProfile != null) { - if (typeof object.mysqlProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.mysqlProfile: object expected"); - message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.fromObject(object.mysqlProfile); - } - if (object.bigqueryProfile != null) { - if (typeof object.bigqueryProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.bigqueryProfile: object expected"); - message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.fromObject(object.bigqueryProfile); - } - if (object.postgresqlProfile != null) { - if (typeof object.postgresqlProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.postgresqlProfile: object expected"); - message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.fromObject(object.postgresqlProfile); - } - if (object.sqlServerProfile != null) { - if (typeof object.sqlServerProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.sqlServerProfile: object expected"); - message.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.fromObject(object.sqlServerProfile); - } - if (object.staticServiceIpConnectivity != null) { - if (typeof object.staticServiceIpConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.staticServiceIpConnectivity: object expected"); - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.fromObject(object.staticServiceIpConnectivity); - } - if (object.forwardSshConnectivity != null) { - if (typeof object.forwardSshConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.forwardSshConnectivity: object expected"); - message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.fromObject(object.forwardSshConnectivity); - } - if (object.privateConnectivity != null) { - if (typeof object.privateConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.privateConnectivity: object expected"); - message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.fromObject(object.privateConnectivity); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1.ConnectionProfile} message ConnectionProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - object.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.toObject(message.oracleProfile, options); - if (options.oneofs) - object.profile = "oracleProfile"; - } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - object.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.toObject(message.gcsProfile, options); - if (options.oneofs) - object.profile = "gcsProfile"; - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - object.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.toObject(message.mysqlProfile, options); - if (options.oneofs) - object.profile = "mysqlProfile"; - } - if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { - object.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.toObject(message.bigqueryProfile, options); - if (options.oneofs) - object.profile = "bigqueryProfile"; - } - if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { - object.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.toObject(message.postgresqlProfile, options); - if (options.oneofs) - object.profile = "postgresqlProfile"; - } - if (message.sqlServerProfile != null && message.hasOwnProperty("sqlServerProfile")) { - object.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.toObject(message.sqlServerProfile, options); - if (options.oneofs) - object.profile = "sqlServerProfile"; - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - object.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.toObject(message.staticServiceIpConnectivity, options); - if (options.oneofs) - object.connectivity = "staticServiceIpConnectivity"; - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - object.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.toObject(message.forwardSshConnectivity, options); - if (options.oneofs) - object.connectivity = "forwardSshConnectivity"; - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - object.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.toObject(message.privateConnectivity, options); - if (options.oneofs) - object.connectivity = "privateConnectivity"; - } - return object; - }; - - /** - * Converts this ConnectionProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - * @returns {Object.} JSON object - */ - ConnectionProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectionProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ConnectionProfile"; - }; - - return ConnectionProfile; - })(); - - v1.OracleColumn = (function() { - - /** - * Properties of an OracleColumn. - * @memberof google.cloud.datastream.v1 - * @interface IOracleColumn - * @property {string|null} [column] OracleColumn column - * @property {string|null} [dataType] OracleColumn dataType - * @property {number|null} [length] OracleColumn length - * @property {number|null} [precision] OracleColumn precision - * @property {number|null} [scale] OracleColumn scale - * @property {string|null} [encoding] OracleColumn encoding - * @property {boolean|null} [primaryKey] OracleColumn primaryKey - * @property {boolean|null} [nullable] OracleColumn nullable - * @property {number|null} [ordinalPosition] OracleColumn ordinalPosition - */ - - /** - * Constructs a new OracleColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleColumn. - * @implements IOracleColumn - * @constructor - * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set - */ - function OracleColumn(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]]; - } - - /** - * OracleColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.column = ""; - - /** - * OracleColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.dataType = ""; - - /** - * OracleColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.length = 0; - - /** - * OracleColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.precision = 0; - - /** - * OracleColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.scale = 0; - - /** - * OracleColumn encoding. - * @member {string} encoding - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.encoding = ""; - - /** - * OracleColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.primaryKey = false; - - /** - * OracleColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.nullable = false; - - /** - * OracleColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.ordinalPosition = 0; - - /** - * Creates a new OracleColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn instance - */ - OracleColumn.create = function create(properties) { - return new OracleColumn(properties); - }; - - /** - * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.encoding); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); - return writer; - }; - - /** - * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.precision = reader.int32(); - break; - } - case 5: { - message.scale = reader.int32(); - break; - } - case 6: { - message.encoding = reader.string(); - break; - } - case 7: { - message.primaryKey = reader.bool(); - break; - } - case 8: { - message.nullable = reader.bool(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleColumn message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - return null; - }; - - /** - * Creates an OracleColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn - */ - OracleColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleColumn) - return object; - var message = new $root.google.cloud.datastream.v1.OracleColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - return message; - }; - - /** - * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {google.cloud.datastream.v1.OracleColumn} message OracleColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.encoding = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - return object; - }; - - /** - * Converts this OracleColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - * @returns {Object.} JSON object - */ - OracleColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleColumn"; - }; - - return OracleColumn; - })(); - - v1.OracleTable = (function() { - - /** - * Properties of an OracleTable. - * @memberof google.cloud.datastream.v1 - * @interface IOracleTable - * @property {string|null} [table] OracleTable table - * @property {Array.|null} [oracleColumns] OracleTable oracleColumns - */ - - /** - * Constructs a new OracleTable. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleTable. - * @implements IOracleTable - * @constructor - * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set - */ - function OracleTable(properties) { - this.oracleColumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.OracleTable - * @instance - */ - OracleTable.prototype.table = ""; - - /** - * OracleTable oracleColumns. - * @member {Array.} oracleColumns - * @memberof google.cloud.datastream.v1.OracleTable - * @instance - */ - OracleTable.prototype.oracleColumns = $util.emptyArray; - - /** - * Creates a new OracleTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable instance - */ - OracleTable.create = function create(properties) { - return new OracleTable(properties); - }; - - /** - * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.oracleColumns != null && message.oracleColumns.length) - for (var i = 0; i < message.oracleColumns.length; ++i) - $root.google.cloud.datastream.v1.OracleColumn.encode(message.oracleColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - if (!(message.oracleColumns && message.oracleColumns.length)) - message.oracleColumns = []; - message.oracleColumns.push($root.google.cloud.datastream.v1.OracleColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleTable message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.oracleColumns != null && message.hasOwnProperty("oracleColumns")) { - if (!Array.isArray(message.oracleColumns)) - return "oracleColumns: array expected"; - for (var i = 0; i < message.oracleColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleColumn.verify(message.oracleColumns[i]); - if (error) - return "oracleColumns." + error; - } - } - return null; - }; - - /** - * Creates an OracleTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable - */ - OracleTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleTable) - return object; - var message = new $root.google.cloud.datastream.v1.OracleTable(); - if (object.table != null) - message.table = String(object.table); - if (object.oracleColumns) { - if (!Array.isArray(object.oracleColumns)) - throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: array expected"); - message.oracleColumns = []; - for (var i = 0; i < object.oracleColumns.length; ++i) { - if (typeof object.oracleColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: object expected"); - message.oracleColumns[i] = $root.google.cloud.datastream.v1.OracleColumn.fromObject(object.oracleColumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {google.cloud.datastream.v1.OracleTable} message OracleTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.oracleColumns && message.oracleColumns.length) { - object.oracleColumns = []; - for (var j = 0; j < message.oracleColumns.length; ++j) - object.oracleColumns[j] = $root.google.cloud.datastream.v1.OracleColumn.toObject(message.oracleColumns[j], options); - } - return object; - }; - - /** - * Converts this OracleTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleTable - * @instance - * @returns {Object.} JSON object - */ - OracleTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleTable"; - }; - - return OracleTable; - })(); - - v1.OracleSchema = (function() { - - /** - * Properties of an OracleSchema. - * @memberof google.cloud.datastream.v1 - * @interface IOracleSchema - * @property {string|null} [schema] OracleSchema schema - * @property {Array.|null} [oracleTables] OracleSchema oracleTables - */ - - /** - * Constructs a new OracleSchema. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleSchema. - * @implements IOracleSchema - * @constructor - * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set - */ - function OracleSchema(properties) { - this.oracleTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleSchema schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.OracleSchema - * @instance - */ - OracleSchema.prototype.schema = ""; - - /** - * OracleSchema oracleTables. - * @member {Array.} oracleTables - * @memberof google.cloud.datastream.v1.OracleSchema - * @instance - */ - OracleSchema.prototype.oracleTables = $util.emptyArray; - - /** - * Creates a new OracleSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema instance - */ - OracleSchema.create = function create(properties) { - return new OracleSchema(properties); - }; - - /** - * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.oracleTables != null && message.oracleTables.length) - for (var i = 0; i < message.oracleTables.length; ++i) - $root.google.cloud.datastream.v1.OracleTable.encode(message.oracleTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - if (!(message.oracleTables && message.oracleTables.length)) - message.oracleTables = []; - message.oracleTables.push($root.google.cloud.datastream.v1.OracleTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleSchema message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.oracleTables != null && message.hasOwnProperty("oracleTables")) { - if (!Array.isArray(message.oracleTables)) - return "oracleTables: array expected"; - for (var i = 0; i < message.oracleTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleTable.verify(message.oracleTables[i]); - if (error) - return "oracleTables." + error; - } - } - return null; - }; - - /** - * Creates an OracleSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema - */ - OracleSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSchema) - return object; - var message = new $root.google.cloud.datastream.v1.OracleSchema(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.oracleTables) { - if (!Array.isArray(object.oracleTables)) - throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: array expected"); - message.oracleTables = []; - for (var i = 0; i < object.oracleTables.length; ++i) { - if (typeof object.oracleTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: object expected"); - message.oracleTables[i] = $root.google.cloud.datastream.v1.OracleTable.fromObject(object.oracleTables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.OracleSchema} message OracleSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleTables = []; - if (options.defaults) - object.schema = ""; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.oracleTables && message.oracleTables.length) { - object.oracleTables = []; - for (var j = 0; j < message.oracleTables.length; ++j) - object.oracleTables[j] = $root.google.cloud.datastream.v1.OracleTable.toObject(message.oracleTables[j], options); - } - return object; - }; - - /** - * Converts this OracleSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSchema - * @instance - * @returns {Object.} JSON object - */ - OracleSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSchema"; - }; - - return OracleSchema; - })(); - - v1.OracleRdbms = (function() { - - /** - * Properties of an OracleRdbms. - * @memberof google.cloud.datastream.v1 - * @interface IOracleRdbms - * @property {Array.|null} [oracleSchemas] OracleRdbms oracleSchemas - */ - - /** - * Constructs a new OracleRdbms. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleRdbms. - * @implements IOracleRdbms - * @constructor - * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set - */ - function OracleRdbms(properties) { - this.oracleSchemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleRdbms oracleSchemas. - * @member {Array.} oracleSchemas - * @memberof google.cloud.datastream.v1.OracleRdbms - * @instance - */ - OracleRdbms.prototype.oracleSchemas = $util.emptyArray; - - /** - * Creates a new OracleRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms instance - */ - OracleRdbms.create = function create(properties) { - return new OracleRdbms(properties); - }; - - /** - * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleSchemas != null && message.oracleSchemas.length) - for (var i = 0; i < message.oracleSchemas.length; ++i) - $root.google.cloud.datastream.v1.OracleSchema.encode(message.oracleSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.oracleSchemas && message.oracleSchemas.length)) - message.oracleSchemas = []; - message.oracleSchemas.push($root.google.cloud.datastream.v1.OracleSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.oracleSchemas != null && message.hasOwnProperty("oracleSchemas")) { - if (!Array.isArray(message.oracleSchemas)) - return "oracleSchemas: array expected"; - for (var i = 0; i < message.oracleSchemas.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleSchema.verify(message.oracleSchemas[i]); - if (error) - return "oracleSchemas." + error; - } - } - return null; - }; - - /** - * Creates an OracleRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms - */ - OracleRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleRdbms) - return object; - var message = new $root.google.cloud.datastream.v1.OracleRdbms(); - if (object.oracleSchemas) { - if (!Array.isArray(object.oracleSchemas)) - throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: array expected"); - message.oracleSchemas = []; - for (var i = 0; i < object.oracleSchemas.length; ++i) { - if (typeof object.oracleSchemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: object expected"); - message.oracleSchemas[i] = $root.google.cloud.datastream.v1.OracleSchema.fromObject(object.oracleSchemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1.OracleRdbms} message OracleRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleSchemas = []; - if (message.oracleSchemas && message.oracleSchemas.length) { - object.oracleSchemas = []; - for (var j = 0; j < message.oracleSchemas.length; ++j) - object.oracleSchemas[j] = $root.google.cloud.datastream.v1.OracleSchema.toObject(message.oracleSchemas[j], options); - } - return object; - }; - - /** - * Converts this OracleRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleRdbms - * @instance - * @returns {Object.} JSON object - */ - OracleRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleRdbms"; - }; - - return OracleRdbms; - })(); - - v1.OracleSourceConfig = (function() { - - /** - * Properties of an OracleSourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface IOracleSourceConfig - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [includeObjects] OracleSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [excludeObjects] OracleSourceConfig excludeObjects - * @property {number|null} [maxConcurrentCdcTasks] OracleSourceConfig maxConcurrentCdcTasks - * @property {number|null} [maxConcurrentBackfillTasks] OracleSourceConfig maxConcurrentBackfillTasks - * @property {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null} [dropLargeObjects] OracleSourceConfig dropLargeObjects - * @property {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null} [streamLargeObjects] OracleSourceConfig streamLargeObjects - * @property {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null} [logMiner] OracleSourceConfig logMiner - * @property {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null} [binaryLogParser] OracleSourceConfig binaryLogParser - */ - - /** - * Constructs a new OracleSourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleSourceConfig. - * @implements IOracleSourceConfig - * @constructor - * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set - */ - function OracleSourceConfig(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]]; - } - - /** - * OracleSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.includeObjects = null; - - /** - * OracleSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.excludeObjects = null; - - /** - * OracleSourceConfig maxConcurrentCdcTasks. - * @member {number} maxConcurrentCdcTasks - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.maxConcurrentCdcTasks = 0; - - /** - * OracleSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - - /** - * OracleSourceConfig dropLargeObjects. - * @member {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null|undefined} dropLargeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.dropLargeObjects = null; - - /** - * OracleSourceConfig streamLargeObjects. - * @member {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null|undefined} streamLargeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.streamLargeObjects = null; - - /** - * OracleSourceConfig logMiner. - * @member {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null|undefined} logMiner - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.logMiner = null; - - /** - * OracleSourceConfig binaryLogParser. - * @member {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null|undefined} binaryLogParser - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.binaryLogParser = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OracleSourceConfig largeObjectsHandling. - * @member {"dropLargeObjects"|"streamLargeObjects"|undefined} largeObjectsHandling - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - Object.defineProperty(OracleSourceConfig.prototype, "largeObjectsHandling", { - get: $util.oneOfGetter($oneOfFields = ["dropLargeObjects", "streamLargeObjects"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * OracleSourceConfig cdcMethod. - * @member {"logMiner"|"binaryLogParser"|undefined} cdcMethod - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - Object.defineProperty(OracleSourceConfig.prototype, "cdcMethod", { - get: $util.oneOfGetter($oneOfFields = ["logMiner", "binaryLogParser"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OracleSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig instance - */ - OracleSourceConfig.create = function create(properties) { - return new OracleSourceConfig(properties); - }; - - /** - * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); - if (message.dropLargeObjects != null && Object.hasOwnProperty.call(message, "dropLargeObjects")) - $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.encode(message.dropLargeObjects, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.streamLargeObjects != null && Object.hasOwnProperty.call(message, "streamLargeObjects")) - $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.encode(message.streamLargeObjects, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.logMiner != null && Object.hasOwnProperty.call(message, "logMiner")) - $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.encode(message.logMiner, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.binaryLogParser != null && Object.hasOwnProperty.call(message, "binaryLogParser")) - $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.encode(message.binaryLogParser, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxConcurrentCdcTasks = reader.int32(); - break; - } - case 4: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - case 100: { - message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.decode(reader, reader.uint32()); - break; - } - case 102: { - message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.decode(reader, reader.uint32()); - break; - } - case 103: { - message.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.decode(reader, reader.uint32()); - break; - } - case 104: { - message.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - if (!$util.isInteger(message.maxConcurrentCdcTasks)) - return "maxConcurrentCdcTasks: integer expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { - properties.largeObjectsHandling = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify(message.dropLargeObjects); - if (error) - return "dropLargeObjects." + error; - } - } - if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { - if (properties.largeObjectsHandling === 1) - return "largeObjectsHandling: multiple values"; - properties.largeObjectsHandling = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify(message.streamLargeObjects); - if (error) - return "streamLargeObjects." + error; - } - } - if (message.logMiner != null && message.hasOwnProperty("logMiner")) { - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify(message.logMiner); - if (error) - return "logMiner." + error; - } - } - if (message.binaryLogParser != null && message.hasOwnProperty("binaryLogParser")) { - if (properties.cdcMethod === 1) - return "cdcMethod: multiple values"; - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify(message.binaryLogParser); - if (error) - return "binaryLogParser." + error; - } - } - return null; - }; - - /** - * Creates an OracleSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig - */ - OracleSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.OracleSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.excludeObjects); - } - if (object.maxConcurrentCdcTasks != null) - message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - if (object.dropLargeObjects != null) { - if (typeof object.dropLargeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.dropLargeObjects: object expected"); - message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.fromObject(object.dropLargeObjects); - } - if (object.streamLargeObjects != null) { - if (typeof object.streamLargeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.streamLargeObjects: object expected"); - message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.fromObject(object.streamLargeObjects); - } - if (object.logMiner != null) { - if (typeof object.logMiner !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.logMiner: object expected"); - message.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.fromObject(object.logMiner); - } - if (object.binaryLogParser != null) { - if (typeof object.binaryLogParser !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.binaryLogParser: object expected"); - message.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.fromObject(object.binaryLogParser); - } - return message; - }; - - /** - * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig} message OracleSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.maxConcurrentCdcTasks = 0; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.excludeObjects, options); - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { - object.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.toObject(message.dropLargeObjects, options); - if (options.oneofs) - object.largeObjectsHandling = "dropLargeObjects"; - } - if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { - object.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.toObject(message.streamLargeObjects, options); - if (options.oneofs) - object.largeObjectsHandling = "streamLargeObjects"; - } - if (message.logMiner != null && message.hasOwnProperty("logMiner")) { - object.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.toObject(message.logMiner, options); - if (options.oneofs) - object.cdcMethod = "logMiner"; - } - if (message.binaryLogParser != null && message.hasOwnProperty("binaryLogParser")) { - object.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.toObject(message.binaryLogParser, options); - if (options.oneofs) - object.cdcMethod = "binaryLogParser"; - } - return object; - }; - - /** - * Converts this OracleSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - * @returns {Object.} JSON object - */ - OracleSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig"; - }; - - OracleSourceConfig.DropLargeObjects = (function() { - - /** - * Properties of a DropLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface IDropLargeObjects - */ - - /** - * Constructs a new DropLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a DropLargeObjects. - * @implements IDropLargeObjects - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set - */ - function DropLargeObjects(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 DropLargeObjects instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects instance - */ - DropLargeObjects.create = function create(properties) { - return new DropLargeObjects(properties); - }; - - /** - * Encodes the specified DropLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropLargeObjects.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DropLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DropLargeObjects message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropLargeObjects.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DropLargeObjects message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropLargeObjects.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DropLargeObjects message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropLargeObjects.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DropLargeObjects message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - */ - DropLargeObjects.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects(); - }; - - /** - * Creates a plain object from a DropLargeObjects message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} message DropLargeObjects - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropLargeObjects.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DropLargeObjects to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @instance - * @returns {Object.} JSON object - */ - DropLargeObjects.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropLargeObjects - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects"; - }; - - return DropLargeObjects; - })(); - - OracleSourceConfig.StreamLargeObjects = (function() { - - /** - * Properties of a StreamLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface IStreamLargeObjects - */ - - /** - * Constructs a new StreamLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a StreamLargeObjects. - * @implements IStreamLargeObjects - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set - */ - function StreamLargeObjects(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 StreamLargeObjects instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects instance - */ - StreamLargeObjects.create = function create(properties) { - return new StreamLargeObjects(properties); - }; - - /** - * Encodes the specified StreamLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamLargeObjects.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StreamLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamLargeObjects.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamLargeObjects.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamLargeObjects message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamLargeObjects.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StreamLargeObjects message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - */ - StreamLargeObjects.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects(); - }; - - /** - * Creates a plain object from a StreamLargeObjects message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} message StreamLargeObjects - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamLargeObjects.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StreamLargeObjects to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @instance - * @returns {Object.} JSON object - */ - StreamLargeObjects.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamLargeObjects - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects"; - }; - - return StreamLargeObjects; - })(); - - OracleSourceConfig.LogMiner = (function() { - - /** - * Properties of a LogMiner. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface ILogMiner - */ - - /** - * Constructs a new LogMiner. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a LogMiner. - * @implements ILogMiner - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner=} [properties] Properties to set - */ - function LogMiner(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 LogMiner instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner instance - */ - LogMiner.create = function create(properties) { - return new LogMiner(properties); - }; - - /** - * Encodes the specified LogMiner message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner} message LogMiner message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogMiner.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified LogMiner message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner} message LogMiner message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogMiner.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogMiner message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogMiner.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogMiner message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogMiner.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogMiner message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogMiner.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a LogMiner message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner - */ - LogMiner.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner(); - }; - - /** - * Creates a plain object from a LogMiner message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} message LogMiner - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogMiner.toObject = function toObject() { - return {}; - }; - - /** - * Converts this LogMiner to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @instance - * @returns {Object.} JSON object - */ - LogMiner.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LogMiner - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LogMiner.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.LogMiner"; - }; - - return LogMiner; - })(); - - OracleSourceConfig.BinaryLogParser = (function() { - - /** - * Properties of a BinaryLogParser. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface IBinaryLogParser - * @property {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null} [oracleAsmLogFileAccess] BinaryLogParser oracleAsmLogFileAccess - * @property {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null} [logFileDirectories] BinaryLogParser logFileDirectories - */ - - /** - * Constructs a new BinaryLogParser. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a BinaryLogParser. - * @implements IBinaryLogParser - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser=} [properties] Properties to set - */ - function BinaryLogParser(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]]; - } - - /** - * BinaryLogParser oracleAsmLogFileAccess. - * @member {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null|undefined} oracleAsmLogFileAccess - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @instance - */ - BinaryLogParser.prototype.oracleAsmLogFileAccess = null; - - /** - * BinaryLogParser logFileDirectories. - * @member {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null|undefined} logFileDirectories - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @instance - */ - BinaryLogParser.prototype.logFileDirectories = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BinaryLogParser logFileAccess. - * @member {"oracleAsmLogFileAccess"|"logFileDirectories"|undefined} logFileAccess - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @instance - */ - Object.defineProperty(BinaryLogParser.prototype, "logFileAccess", { - get: $util.oneOfGetter($oneOfFields = ["oracleAsmLogFileAccess", "logFileDirectories"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BinaryLogParser instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser instance - */ - BinaryLogParser.create = function create(properties) { - return new BinaryLogParser(properties); - }; - - /** - * Encodes the specified BinaryLogParser message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser} message BinaryLogParser message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryLogParser.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleAsmLogFileAccess != null && Object.hasOwnProperty.call(message, "oracleAsmLogFileAccess")) - $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.encode(message.oracleAsmLogFileAccess, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.logFileDirectories != null && Object.hasOwnProperty.call(message, "logFileDirectories")) - $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.encode(message.logFileDirectories, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BinaryLogParser message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser} message BinaryLogParser message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryLogParser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinaryLogParser message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryLogParser.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.decode(reader, reader.uint32()); - break; - } - case 2: { - message.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinaryLogParser message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryLogParser.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinaryLogParser message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinaryLogParser.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleAsmLogFileAccess != null && message.hasOwnProperty("oracleAsmLogFileAccess")) { - properties.logFileAccess = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify(message.oracleAsmLogFileAccess); - if (error) - return "oracleAsmLogFileAccess." + error; - } - } - if (message.logFileDirectories != null && message.hasOwnProperty("logFileDirectories")) { - if (properties.logFileAccess === 1) - return "logFileAccess: multiple values"; - properties.logFileAccess = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify(message.logFileDirectories); - if (error) - return "logFileDirectories." + error; - } - } - return null; - }; - - /** - * Creates a BinaryLogParser message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser - */ - BinaryLogParser.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser) - return object; - var message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser(); - if (object.oracleAsmLogFileAccess != null) { - if (typeof object.oracleAsmLogFileAccess !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.oracleAsmLogFileAccess: object expected"); - message.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.fromObject(object.oracleAsmLogFileAccess); - } - if (object.logFileDirectories != null) { - if (typeof object.logFileDirectories !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.logFileDirectories: object expected"); - message.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.fromObject(object.logFileDirectories); - } - return message; - }; - - /** - * Creates a plain object from a BinaryLogParser message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} message BinaryLogParser - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinaryLogParser.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleAsmLogFileAccess != null && message.hasOwnProperty("oracleAsmLogFileAccess")) { - object.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.toObject(message.oracleAsmLogFileAccess, options); - if (options.oneofs) - object.logFileAccess = "oracleAsmLogFileAccess"; - } - if (message.logFileDirectories != null && message.hasOwnProperty("logFileDirectories")) { - object.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.toObject(message.logFileDirectories, options); - if (options.oneofs) - object.logFileAccess = "logFileDirectories"; - } - return object; - }; - - /** - * Converts this BinaryLogParser to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @instance - * @returns {Object.} JSON object - */ - BinaryLogParser.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BinaryLogParser - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BinaryLogParser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser"; - }; - - BinaryLogParser.OracleAsmLogFileAccess = (function() { - - /** - * Properties of an OracleAsmLogFileAccess. - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @interface IOracleAsmLogFileAccess - */ - - /** - * Constructs a new OracleAsmLogFileAccess. - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @classdesc Represents an OracleAsmLogFileAccess. - * @implements IOracleAsmLogFileAccess - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess=} [properties] Properties to set - */ - function OracleAsmLogFileAccess(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 OracleAsmLogFileAccess instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess instance - */ - OracleAsmLogFileAccess.create = function create(properties) { - return new OracleAsmLogFileAccess(properties); - }; - - /** - * Encodes the specified OracleAsmLogFileAccess message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess} message OracleAsmLogFileAccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleAsmLogFileAccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified OracleAsmLogFileAccess message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess} message OracleAsmLogFileAccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleAsmLogFileAccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleAsmLogFileAccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleAsmLogFileAccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleAsmLogFileAccess message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleAsmLogFileAccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an OracleAsmLogFileAccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess - */ - OracleAsmLogFileAccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess(); - }; - - /** - * Creates a plain object from an OracleAsmLogFileAccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} message OracleAsmLogFileAccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleAsmLogFileAccess.toObject = function toObject() { - return {}; - }; - - /** - * Converts this OracleAsmLogFileAccess to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @instance - * @returns {Object.} JSON object - */ - OracleAsmLogFileAccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleAsmLogFileAccess - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleAsmLogFileAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess"; - }; - - return OracleAsmLogFileAccess; - })(); - - BinaryLogParser.LogFileDirectories = (function() { - - /** - * Properties of a LogFileDirectories. - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @interface ILogFileDirectories - * @property {string|null} [onlineLogDirectory] LogFileDirectories onlineLogDirectory - * @property {string|null} [archivedLogDirectory] LogFileDirectories archivedLogDirectory - */ - - /** - * Constructs a new LogFileDirectories. - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser - * @classdesc Represents a LogFileDirectories. - * @implements ILogFileDirectories - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories=} [properties] Properties to set - */ - function LogFileDirectories(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]]; - } - - /** - * LogFileDirectories onlineLogDirectory. - * @member {string} onlineLogDirectory - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @instance - */ - LogFileDirectories.prototype.onlineLogDirectory = ""; - - /** - * LogFileDirectories archivedLogDirectory. - * @member {string} archivedLogDirectory - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @instance - */ - LogFileDirectories.prototype.archivedLogDirectory = ""; - - /** - * Creates a new LogFileDirectories instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories instance - */ - LogFileDirectories.create = function create(properties) { - return new LogFileDirectories(properties); - }; - - /** - * Encodes the specified LogFileDirectories message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories} message LogFileDirectories message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogFileDirectories.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onlineLogDirectory != null && Object.hasOwnProperty.call(message, "onlineLogDirectory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.onlineLogDirectory); - if (message.archivedLogDirectory != null && Object.hasOwnProperty.call(message, "archivedLogDirectory")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.archivedLogDirectory); - return writer; - }; - - /** - * Encodes the specified LogFileDirectories message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories} message LogFileDirectories message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogFileDirectories.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogFileDirectories message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogFileDirectories.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.onlineLogDirectory = reader.string(); - break; - } - case 2: { - message.archivedLogDirectory = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogFileDirectories message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogFileDirectories.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogFileDirectories message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogFileDirectories.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.onlineLogDirectory != null && message.hasOwnProperty("onlineLogDirectory")) - if (!$util.isString(message.onlineLogDirectory)) - return "onlineLogDirectory: string expected"; - if (message.archivedLogDirectory != null && message.hasOwnProperty("archivedLogDirectory")) - if (!$util.isString(message.archivedLogDirectory)) - return "archivedLogDirectory: string expected"; - return null; - }; - - /** - * Creates a LogFileDirectories message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories - */ - LogFileDirectories.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories) - return object; - var message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories(); - if (object.onlineLogDirectory != null) - message.onlineLogDirectory = String(object.onlineLogDirectory); - if (object.archivedLogDirectory != null) - message.archivedLogDirectory = String(object.archivedLogDirectory); - return message; - }; - - /** - * Creates a plain object from a LogFileDirectories message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} message LogFileDirectories - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogFileDirectories.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.onlineLogDirectory = ""; - object.archivedLogDirectory = ""; - } - if (message.onlineLogDirectory != null && message.hasOwnProperty("onlineLogDirectory")) - object.onlineLogDirectory = message.onlineLogDirectory; - if (message.archivedLogDirectory != null && message.hasOwnProperty("archivedLogDirectory")) - object.archivedLogDirectory = message.archivedLogDirectory; - return object; - }; - - /** - * Converts this LogFileDirectories to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @instance - * @returns {Object.} JSON object - */ - LogFileDirectories.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LogFileDirectories - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LogFileDirectories.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories"; - }; - - return LogFileDirectories; - })(); - - return BinaryLogParser; - })(); - - return OracleSourceConfig; - })(); - - v1.PostgresqlColumn = (function() { - - /** - * Properties of a PostgresqlColumn. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlColumn - * @property {string|null} [column] PostgresqlColumn column - * @property {string|null} [dataType] PostgresqlColumn dataType - * @property {number|null} [length] PostgresqlColumn length - * @property {number|null} [precision] PostgresqlColumn precision - * @property {number|null} [scale] PostgresqlColumn scale - * @property {boolean|null} [primaryKey] PostgresqlColumn primaryKey - * @property {boolean|null} [nullable] PostgresqlColumn nullable - * @property {number|null} [ordinalPosition] PostgresqlColumn ordinalPosition - */ - - /** - * Constructs a new PostgresqlColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlColumn. - * @implements IPostgresqlColumn - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set - */ - function PostgresqlColumn(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]]; - } - - /** - * PostgresqlColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.column = ""; - - /** - * PostgresqlColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.dataType = ""; - - /** - * PostgresqlColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.length = 0; - - /** - * PostgresqlColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.precision = 0; - - /** - * PostgresqlColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.scale = 0; - - /** - * PostgresqlColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.primaryKey = false; - - /** - * PostgresqlColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.nullable = false; - - /** - * PostgresqlColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.ordinalPosition = 0; - - /** - * Creates a new PostgresqlColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn instance - */ - PostgresqlColumn.create = function create(properties) { - return new PostgresqlColumn(properties); - }; - - /** - * Encodes the specified PostgresqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); - return writer; - }; - - /** - * Encodes the specified PostgresqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.precision = reader.int32(); - break; - } - case 5: { - message.scale = reader.int32(); - break; - } - case 7: { - message.primaryKey = reader.bool(); - break; - } - case 8: { - message.nullable = reader.bool(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlColumn message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - return null; - }; - - /** - * Creates a PostgresqlColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn - */ - PostgresqlColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlColumn) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - return message; - }; - - /** - * Creates a plain object from a PostgresqlColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {google.cloud.datastream.v1.PostgresqlColumn} message PostgresqlColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - return object; - }; - - /** - * Converts this PostgresqlColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - * @returns {Object.} JSON object - */ - PostgresqlColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlColumn"; - }; - - return PostgresqlColumn; - })(); - - v1.PostgresqlTable = (function() { - - /** - * Properties of a PostgresqlTable. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlTable - * @property {string|null} [table] PostgresqlTable table - * @property {Array.|null} [postgresqlColumns] PostgresqlTable postgresqlColumns - */ - - /** - * Constructs a new PostgresqlTable. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlTable. - * @implements IPostgresqlTable - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set - */ - function PostgresqlTable(properties) { - this.postgresqlColumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostgresqlTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @instance - */ - PostgresqlTable.prototype.table = ""; - - /** - * PostgresqlTable postgresqlColumns. - * @member {Array.} postgresqlColumns - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @instance - */ - PostgresqlTable.prototype.postgresqlColumns = $util.emptyArray; - - /** - * Creates a new PostgresqlTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable instance - */ - PostgresqlTable.create = function create(properties) { - return new PostgresqlTable(properties); - }; - - /** - * Encodes the specified PostgresqlTable message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.postgresqlColumns != null && message.postgresqlColumns.length) - for (var i = 0; i < message.postgresqlColumns.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlColumn.encode(message.postgresqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostgresqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - if (!(message.postgresqlColumns && message.postgresqlColumns.length)) - message.postgresqlColumns = []; - message.postgresqlColumns.push($root.google.cloud.datastream.v1.PostgresqlColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlTable message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.postgresqlColumns != null && message.hasOwnProperty("postgresqlColumns")) { - if (!Array.isArray(message.postgresqlColumns)) - return "postgresqlColumns: array expected"; - for (var i = 0; i < message.postgresqlColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlColumn.verify(message.postgresqlColumns[i]); - if (error) - return "postgresqlColumns." + error; - } - } - return null; - }; - - /** - * Creates a PostgresqlTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable - */ - PostgresqlTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlTable) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlTable(); - if (object.table != null) - message.table = String(object.table); - if (object.postgresqlColumns) { - if (!Array.isArray(object.postgresqlColumns)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: array expected"); - message.postgresqlColumns = []; - for (var i = 0; i < object.postgresqlColumns.length; ++i) { - if (typeof object.postgresqlColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: object expected"); - message.postgresqlColumns[i] = $root.google.cloud.datastream.v1.PostgresqlColumn.fromObject(object.postgresqlColumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PostgresqlTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.PostgresqlTable} message PostgresqlTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.postgresqlColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.postgresqlColumns && message.postgresqlColumns.length) { - object.postgresqlColumns = []; - for (var j = 0; j < message.postgresqlColumns.length; ++j) - object.postgresqlColumns[j] = $root.google.cloud.datastream.v1.PostgresqlColumn.toObject(message.postgresqlColumns[j], options); - } - return object; - }; - - /** - * Converts this PostgresqlTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @instance - * @returns {Object.} JSON object - */ - PostgresqlTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlTable"; - }; - - return PostgresqlTable; - })(); - - v1.PostgresqlSchema = (function() { - - /** - * Properties of a PostgresqlSchema. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlSchema - * @property {string|null} [schema] PostgresqlSchema schema - * @property {Array.|null} [postgresqlTables] PostgresqlSchema postgresqlTables - */ - - /** - * Constructs a new PostgresqlSchema. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlSchema. - * @implements IPostgresqlSchema - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set - */ - function PostgresqlSchema(properties) { - this.postgresqlTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostgresqlSchema schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - */ - PostgresqlSchema.prototype.schema = ""; - - /** - * PostgresqlSchema postgresqlTables. - * @member {Array.} postgresqlTables - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - */ - PostgresqlSchema.prototype.postgresqlTables = $util.emptyArray; - - /** - * Creates a new PostgresqlSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema instance - */ - PostgresqlSchema.create = function create(properties) { - return new PostgresqlSchema(properties); - }; - - /** - * Encodes the specified PostgresqlSchema message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.postgresqlTables != null && message.postgresqlTables.length) - for (var i = 0; i < message.postgresqlTables.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlTable.encode(message.postgresqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostgresqlSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - if (!(message.postgresqlTables && message.postgresqlTables.length)) - message.postgresqlTables = []; - message.postgresqlTables.push($root.google.cloud.datastream.v1.PostgresqlTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlSchema message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.postgresqlTables != null && message.hasOwnProperty("postgresqlTables")) { - if (!Array.isArray(message.postgresqlTables)) - return "postgresqlTables: array expected"; - for (var i = 0; i < message.postgresqlTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlTable.verify(message.postgresqlTables[i]); - if (error) - return "postgresqlTables." + error; - } - } - return null; - }; - - /** - * Creates a PostgresqlSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - */ - PostgresqlSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSchema) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSchema(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.postgresqlTables) { - if (!Array.isArray(object.postgresqlTables)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: array expected"); - message.postgresqlTables = []; - for (var i = 0; i < object.postgresqlTables.length; ++i) { - if (typeof object.postgresqlTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: object expected"); - message.postgresqlTables[i] = $root.google.cloud.datastream.v1.PostgresqlTable.fromObject(object.postgresqlTables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PostgresqlSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.PostgresqlSchema} message PostgresqlSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.postgresqlTables = []; - if (options.defaults) - object.schema = ""; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.postgresqlTables && message.postgresqlTables.length) { - object.postgresqlTables = []; - for (var j = 0; j < message.postgresqlTables.length; ++j) - object.postgresqlTables[j] = $root.google.cloud.datastream.v1.PostgresqlTable.toObject(message.postgresqlTables[j], options); - } - return object; - }; - - /** - * Converts this PostgresqlSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - * @returns {Object.} JSON object - */ - PostgresqlSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSchema"; - }; - - return PostgresqlSchema; - })(); - - v1.PostgresqlRdbms = (function() { - - /** - * Properties of a PostgresqlRdbms. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlRdbms - * @property {Array.|null} [postgresqlSchemas] PostgresqlRdbms postgresqlSchemas - */ - - /** - * Constructs a new PostgresqlRdbms. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlRdbms. - * @implements IPostgresqlRdbms - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set - */ - function PostgresqlRdbms(properties) { - this.postgresqlSchemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostgresqlRdbms postgresqlSchemas. - * @member {Array.} postgresqlSchemas - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @instance - */ - PostgresqlRdbms.prototype.postgresqlSchemas = $util.emptyArray; - - /** - * Creates a new PostgresqlRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms instance - */ - PostgresqlRdbms.create = function create(properties) { - return new PostgresqlRdbms(properties); - }; - - /** - * Encodes the specified PostgresqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.postgresqlSchemas != null && message.postgresqlSchemas.length) - for (var i = 0; i < message.postgresqlSchemas.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlSchema.encode(message.postgresqlSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostgresqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.postgresqlSchemas && message.postgresqlSchemas.length)) - message.postgresqlSchemas = []; - message.postgresqlSchemas.push($root.google.cloud.datastream.v1.PostgresqlSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.postgresqlSchemas != null && message.hasOwnProperty("postgresqlSchemas")) { - if (!Array.isArray(message.postgresqlSchemas)) - return "postgresqlSchemas: array expected"; - for (var i = 0; i < message.postgresqlSchemas.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlSchema.verify(message.postgresqlSchemas[i]); - if (error) - return "postgresqlSchemas." + error; - } - } - return null; - }; - - /** - * Creates a PostgresqlRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - */ - PostgresqlRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlRdbms) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlRdbms(); - if (object.postgresqlSchemas) { - if (!Array.isArray(object.postgresqlSchemas)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: array expected"); - message.postgresqlSchemas = []; - for (var i = 0; i < object.postgresqlSchemas.length; ++i) { - if (typeof object.postgresqlSchemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: object expected"); - message.postgresqlSchemas[i] = $root.google.cloud.datastream.v1.PostgresqlSchema.fromObject(object.postgresqlSchemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PostgresqlRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.PostgresqlRdbms} message PostgresqlRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.postgresqlSchemas = []; - if (message.postgresqlSchemas && message.postgresqlSchemas.length) { - object.postgresqlSchemas = []; - for (var j = 0; j < message.postgresqlSchemas.length; ++j) - object.postgresqlSchemas[j] = $root.google.cloud.datastream.v1.PostgresqlSchema.toObject(message.postgresqlSchemas[j], options); - } - return object; - }; - - /** - * Converts this PostgresqlRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @instance - * @returns {Object.} JSON object - */ - PostgresqlRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlRdbms"; - }; - - return PostgresqlRdbms; - })(); - - v1.PostgresqlSourceConfig = (function() { - - /** - * Properties of a PostgresqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlSourceConfig - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [includeObjects] PostgresqlSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [excludeObjects] PostgresqlSourceConfig excludeObjects - * @property {string|null} [replicationSlot] PostgresqlSourceConfig replicationSlot - * @property {string|null} [publication] PostgresqlSourceConfig publication - * @property {number|null} [maxConcurrentBackfillTasks] PostgresqlSourceConfig maxConcurrentBackfillTasks - */ - - /** - * Constructs a new PostgresqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlSourceConfig. - * @implements IPostgresqlSourceConfig - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set - */ - function PostgresqlSourceConfig(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]]; - } - - /** - * PostgresqlSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.includeObjects = null; - - /** - * PostgresqlSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.excludeObjects = null; - - /** - * PostgresqlSourceConfig replicationSlot. - * @member {string} replicationSlot - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.replicationSlot = ""; - - /** - * PostgresqlSourceConfig publication. - * @member {string} publication - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.publication = ""; - - /** - * PostgresqlSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - - /** - * Creates a new PostgresqlSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig instance - */ - PostgresqlSourceConfig.create = function create(properties) { - return new PostgresqlSourceConfig(properties); - }; - - /** - * Encodes the specified PostgresqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.replicationSlot != null && Object.hasOwnProperty.call(message, "replicationSlot")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationSlot); - if (message.publication != null && Object.hasOwnProperty.call(message, "publication")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.publication); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxConcurrentBackfillTasks); - return writer; - }; - - /** - * Encodes the specified PostgresqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.replicationSlot = reader.string(); - break; - } - case 4: { - message.publication = reader.string(); - break; - } - case 5: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) - if (!$util.isString(message.replicationSlot)) - return "replicationSlot: string expected"; - if (message.publication != null && message.hasOwnProperty("publication")) - if (!$util.isString(message.publication)) - return "publication: string expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - return null; - }; - - /** - * Creates a PostgresqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - */ - PostgresqlSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.excludeObjects); - } - if (object.replicationSlot != null) - message.replicationSlot = String(object.replicationSlot); - if (object.publication != null) - message.publication = String(object.publication); - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - return message; - }; - - /** - * Creates a plain object from a PostgresqlSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.PostgresqlSourceConfig} message PostgresqlSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.replicationSlot = ""; - object.publication = ""; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.excludeObjects, options); - if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) - object.replicationSlot = message.replicationSlot; - if (message.publication != null && message.hasOwnProperty("publication")) - object.publication = message.publication; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - return object; - }; - - /** - * Converts this PostgresqlSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - * @returns {Object.} JSON object - */ - PostgresqlSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSourceConfig"; - }; - - return PostgresqlSourceConfig; - })(); - - v1.SqlServerColumn = (function() { - - /** - * Properties of a SqlServerColumn. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerColumn - * @property {string|null} [column] SqlServerColumn column - * @property {string|null} [dataType] SqlServerColumn dataType - * @property {number|null} [length] SqlServerColumn length - * @property {number|null} [precision] SqlServerColumn precision - * @property {number|null} [scale] SqlServerColumn scale - * @property {boolean|null} [primaryKey] SqlServerColumn primaryKey - * @property {boolean|null} [nullable] SqlServerColumn nullable - * @property {number|null} [ordinalPosition] SqlServerColumn ordinalPosition - */ - - /** - * Constructs a new SqlServerColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerColumn. - * @implements ISqlServerColumn - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerColumn=} [properties] Properties to set - */ - function SqlServerColumn(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]]; - } - - /** - * SqlServerColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.column = ""; - - /** - * SqlServerColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.dataType = ""; - - /** - * SqlServerColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.length = 0; - - /** - * SqlServerColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.precision = 0; - - /** - * SqlServerColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.scale = 0; - - /** - * SqlServerColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.primaryKey = false; - - /** - * SqlServerColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.nullable = false; - - /** - * SqlServerColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - */ - SqlServerColumn.prototype.ordinalPosition = 0; - - /** - * Creates a new SqlServerColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {google.cloud.datastream.v1.ISqlServerColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn instance - */ - SqlServerColumn.create = function create(properties) { - return new SqlServerColumn(properties); - }; - - /** - * Encodes the specified SqlServerColumn message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {google.cloud.datastream.v1.ISqlServerColumn} message SqlServerColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.ordinalPosition); - return writer; - }; - - /** - * Encodes the specified SqlServerColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {google.cloud.datastream.v1.ISqlServerColumn} message SqlServerColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.precision = reader.int32(); - break; - } - case 5: { - message.scale = reader.int32(); - break; - } - case 6: { - message.primaryKey = reader.bool(); - break; - } - case 7: { - message.nullable = reader.bool(); - break; - } - case 8: { - message.ordinalPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerColumn message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - return null; - }; - - /** - * Creates a SqlServerColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn - */ - SqlServerColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerColumn) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - return message; - }; - - /** - * Creates a plain object from a SqlServerColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {google.cloud.datastream.v1.SqlServerColumn} message SqlServerColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - return object; - }; - - /** - * Converts this SqlServerColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @instance - * @returns {Object.} JSON object - */ - SqlServerColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerColumn"; - }; - - return SqlServerColumn; - })(); - - v1.SqlServerTable = (function() { - - /** - * Properties of a SqlServerTable. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerTable - * @property {string|null} [table] SqlServerTable table - * @property {Array.|null} [columns] SqlServerTable columns - */ - - /** - * Constructs a new SqlServerTable. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerTable. - * @implements ISqlServerTable - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerTable=} [properties] Properties to set - */ - function SqlServerTable(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlServerTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SqlServerTable - * @instance - */ - SqlServerTable.prototype.table = ""; - - /** - * SqlServerTable columns. - * @member {Array.} columns - * @memberof google.cloud.datastream.v1.SqlServerTable - * @instance - */ - SqlServerTable.prototype.columns = $util.emptyArray; - - /** - * Creates a new SqlServerTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {google.cloud.datastream.v1.ISqlServerTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable instance - */ - SqlServerTable.create = function create(properties) { - return new SqlServerTable(properties); - }; - - /** - * Encodes the specified SqlServerTable message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {google.cloud.datastream.v1.ISqlServerTable} message SqlServerTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.datastream.v1.SqlServerColumn.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlServerTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {google.cloud.datastream.v1.ISqlServerTable} message SqlServerTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.datastream.v1.SqlServerColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerTable message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.datastream.v1.SqlServerColumn.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a SqlServerTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable - */ - SqlServerTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerTable) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerTable(); - if (object.table != null) - message.table = String(object.table); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.datastream.v1.SqlServerTable.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerTable.columns: object expected"); - message.columns[i] = $root.google.cloud.datastream.v1.SqlServerColumn.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SqlServerTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {google.cloud.datastream.v1.SqlServerTable} message SqlServerTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.datastream.v1.SqlServerColumn.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this SqlServerTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerTable - * @instance - * @returns {Object.} JSON object - */ - SqlServerTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerTable"; - }; - - return SqlServerTable; - })(); - - v1.SqlServerSchema = (function() { - - /** - * Properties of a SqlServerSchema. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerSchema - * @property {string|null} [schema] SqlServerSchema schema - * @property {Array.|null} [tables] SqlServerSchema tables - */ - - /** - * Constructs a new SqlServerSchema. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerSchema. - * @implements ISqlServerSchema - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerSchema=} [properties] Properties to set - */ - function SqlServerSchema(properties) { - this.tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlServerSchema schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @instance - */ - SqlServerSchema.prototype.schema = ""; - - /** - * SqlServerSchema tables. - * @member {Array.} tables - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @instance - */ - SqlServerSchema.prototype.tables = $util.emptyArray; - - /** - * Creates a new SqlServerSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {google.cloud.datastream.v1.ISqlServerSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema instance - */ - SqlServerSchema.create = function create(properties) { - return new SqlServerSchema(properties); - }; - - /** - * Encodes the specified SqlServerSchema message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {google.cloud.datastream.v1.ISqlServerSchema} message SqlServerSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - $root.google.cloud.datastream.v1.SqlServerTable.encode(message.tables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlServerSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {google.cloud.datastream.v1.ISqlServerSchema} message SqlServerSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push($root.google.cloud.datastream.v1.SqlServerTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerSchema message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) { - var error = $root.google.cloud.datastream.v1.SqlServerTable.verify(message.tables[i]); - if (error) - return "tables." + error; - } - } - return null; - }; - - /** - * Creates a SqlServerSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema - */ - SqlServerSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerSchema) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerSchema(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".google.cloud.datastream.v1.SqlServerSchema.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) { - if (typeof object.tables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerSchema.tables: object expected"); - message.tables[i] = $root.google.cloud.datastream.v1.SqlServerTable.fromObject(object.tables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SqlServerSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {google.cloud.datastream.v1.SqlServerSchema} message SqlServerSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (options.defaults) - object.schema = ""; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = $root.google.cloud.datastream.v1.SqlServerTable.toObject(message.tables[j], options); - } - return object; - }; - - /** - * Converts this SqlServerSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @instance - * @returns {Object.} JSON object - */ - SqlServerSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerSchema"; - }; - - return SqlServerSchema; - })(); - - v1.SqlServerRdbms = (function() { - - /** - * Properties of a SqlServerRdbms. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerRdbms - * @property {Array.|null} [schemas] SqlServerRdbms schemas - */ - - /** - * Constructs a new SqlServerRdbms. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerRdbms. - * @implements ISqlServerRdbms - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerRdbms=} [properties] Properties to set - */ - function SqlServerRdbms(properties) { - this.schemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlServerRdbms schemas. - * @member {Array.} schemas - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @instance - */ - SqlServerRdbms.prototype.schemas = $util.emptyArray; - - /** - * Creates a new SqlServerRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {google.cloud.datastream.v1.ISqlServerRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms instance - */ - SqlServerRdbms.create = function create(properties) { - return new SqlServerRdbms(properties); - }; - - /** - * Encodes the specified SqlServerRdbms message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {google.cloud.datastream.v1.ISqlServerRdbms} message SqlServerRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schemas != null && message.schemas.length) - for (var i = 0; i < message.schemas.length; ++i) - $root.google.cloud.datastream.v1.SqlServerSchema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlServerRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {google.cloud.datastream.v1.ISqlServerRdbms} message SqlServerRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.schemas && message.schemas.length)) - message.schemas = []; - message.schemas.push($root.google.cloud.datastream.v1.SqlServerSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemas != null && message.hasOwnProperty("schemas")) { - if (!Array.isArray(message.schemas)) - return "schemas: array expected"; - for (var i = 0; i < message.schemas.length; ++i) { - var error = $root.google.cloud.datastream.v1.SqlServerSchema.verify(message.schemas[i]); - if (error) - return "schemas." + error; - } - } - return null; - }; - - /** - * Creates a SqlServerRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms - */ - SqlServerRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerRdbms) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerRdbms(); - if (object.schemas) { - if (!Array.isArray(object.schemas)) - throw TypeError(".google.cloud.datastream.v1.SqlServerRdbms.schemas: array expected"); - message.schemas = []; - for (var i = 0; i < object.schemas.length; ++i) { - if (typeof object.schemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerRdbms.schemas: object expected"); - message.schemas[i] = $root.google.cloud.datastream.v1.SqlServerSchema.fromObject(object.schemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SqlServerRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {google.cloud.datastream.v1.SqlServerRdbms} message SqlServerRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.schemas = []; - if (message.schemas && message.schemas.length) { - object.schemas = []; - for (var j = 0; j < message.schemas.length; ++j) - object.schemas[j] = $root.google.cloud.datastream.v1.SqlServerSchema.toObject(message.schemas[j], options); - } - return object; - }; - - /** - * Converts this SqlServerRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @instance - * @returns {Object.} JSON object - */ - SqlServerRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerRdbms"; - }; - - return SqlServerRdbms; - })(); - - v1.SqlServerSourceConfig = (function() { - - /** - * Properties of a SqlServerSourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerSourceConfig - * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [includeObjects] SqlServerSourceConfig includeObjects - * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [excludeObjects] SqlServerSourceConfig excludeObjects - * @property {number|null} [maxConcurrentCdcTasks] SqlServerSourceConfig maxConcurrentCdcTasks - * @property {number|null} [maxConcurrentBackfillTasks] SqlServerSourceConfig maxConcurrentBackfillTasks - * @property {google.cloud.datastream.v1.ISqlServerTransactionLogs|null} [transactionLogs] SqlServerSourceConfig transactionLogs - * @property {google.cloud.datastream.v1.ISqlServerChangeTables|null} [changeTables] SqlServerSourceConfig changeTables - */ - - /** - * Constructs a new SqlServerSourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerSourceConfig. - * @implements ISqlServerSourceConfig - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerSourceConfig=} [properties] Properties to set - */ - function SqlServerSourceConfig(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]]; - } - - /** - * SqlServerSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.includeObjects = null; - - /** - * SqlServerSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.excludeObjects = null; - - /** - * SqlServerSourceConfig maxConcurrentCdcTasks. - * @member {number} maxConcurrentCdcTasks - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.maxConcurrentCdcTasks = 0; - - /** - * SqlServerSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - - /** - * SqlServerSourceConfig transactionLogs. - * @member {google.cloud.datastream.v1.ISqlServerTransactionLogs|null|undefined} transactionLogs - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.transactionLogs = null; - - /** - * SqlServerSourceConfig changeTables. - * @member {google.cloud.datastream.v1.ISqlServerChangeTables|null|undefined} changeTables - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - SqlServerSourceConfig.prototype.changeTables = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SqlServerSourceConfig cdcMethod. - * @member {"transactionLogs"|"changeTables"|undefined} cdcMethod - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - */ - Object.defineProperty(SqlServerSourceConfig.prototype, "cdcMethod", { - get: $util.oneOfGetter($oneOfFields = ["transactionLogs", "changeTables"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SqlServerSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {google.cloud.datastream.v1.ISqlServerSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig instance - */ - SqlServerSourceConfig.create = function create(properties) { - return new SqlServerSourceConfig(properties); - }; - - /** - * Encodes the specified SqlServerSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {google.cloud.datastream.v1.ISqlServerSourceConfig} message SqlServerSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); - if (message.transactionLogs != null && Object.hasOwnProperty.call(message, "transactionLogs")) - $root.google.cloud.datastream.v1.SqlServerTransactionLogs.encode(message.transactionLogs, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.changeTables != null && Object.hasOwnProperty.call(message, "changeTables")) - $root.google.cloud.datastream.v1.SqlServerChangeTables.encode(message.changeTables, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlServerSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {google.cloud.datastream.v1.ISqlServerSourceConfig} message SqlServerSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxConcurrentCdcTasks = reader.int32(); - break; - } - case 4: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - case 101: { - message.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.decode(reader, reader.uint32()); - break; - } - case 102: { - message.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - if (!$util.isInteger(message.maxConcurrentCdcTasks)) - return "maxConcurrentCdcTasks: integer expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - if (message.transactionLogs != null && message.hasOwnProperty("transactionLogs")) { - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.verify(message.transactionLogs); - if (error) - return "transactionLogs." + error; - } - } - if (message.changeTables != null && message.hasOwnProperty("changeTables")) { - if (properties.cdcMethod === 1) - return "cdcMethod: multiple values"; - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerChangeTables.verify(message.changeTables); - if (error) - return "changeTables." + error; - } - } - return null; - }; - - /** - * Creates a SqlServerSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig - */ - SqlServerSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.excludeObjects); - } - if (object.maxConcurrentCdcTasks != null) - message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - if (object.transactionLogs != null) { - if (typeof object.transactionLogs !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.transactionLogs: object expected"); - message.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.fromObject(object.transactionLogs); - } - if (object.changeTables != null) { - if (typeof object.changeTables !== "object") - throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.changeTables: object expected"); - message.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.fromObject(object.changeTables); - } - return message; - }; - - /** - * Creates a plain object from a SqlServerSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {google.cloud.datastream.v1.SqlServerSourceConfig} message SqlServerSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.maxConcurrentCdcTasks = 0; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.excludeObjects, options); - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - if (message.transactionLogs != null && message.hasOwnProperty("transactionLogs")) { - object.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.toObject(message.transactionLogs, options); - if (options.oneofs) - object.cdcMethod = "transactionLogs"; - } - if (message.changeTables != null && message.hasOwnProperty("changeTables")) { - object.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.toObject(message.changeTables, options); - if (options.oneofs) - object.cdcMethod = "changeTables"; - } - return object; - }; - - /** - * Converts this SqlServerSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @instance - * @returns {Object.} JSON object - */ - SqlServerSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerSourceConfig"; - }; - - return SqlServerSourceConfig; - })(); - - v1.SqlServerTransactionLogs = (function() { - - /** - * Properties of a SqlServerTransactionLogs. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerTransactionLogs - */ - - /** - * Constructs a new SqlServerTransactionLogs. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerTransactionLogs. - * @implements ISqlServerTransactionLogs - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs=} [properties] Properties to set - */ - function SqlServerTransactionLogs(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 SqlServerTransactionLogs instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs instance - */ - SqlServerTransactionLogs.create = function create(properties) { - return new SqlServerTransactionLogs(properties); - }; - - /** - * Encodes the specified SqlServerTransactionLogs message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs} message SqlServerTransactionLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerTransactionLogs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SqlServerTransactionLogs message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs} message SqlServerTransactionLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerTransactionLogs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerTransactionLogs message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerTransactionLogs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerTransactionLogs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerTransactionLogs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerTransactionLogs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerTransactionLogs message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerTransactionLogs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SqlServerTransactionLogs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs - */ - SqlServerTransactionLogs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerTransactionLogs) - return object; - return new $root.google.cloud.datastream.v1.SqlServerTransactionLogs(); - }; - - /** - * Creates a plain object from a SqlServerTransactionLogs message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {google.cloud.datastream.v1.SqlServerTransactionLogs} message SqlServerTransactionLogs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerTransactionLogs.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SqlServerTransactionLogs to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @instance - * @returns {Object.} JSON object - */ - SqlServerTransactionLogs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerTransactionLogs - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerTransactionLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerTransactionLogs"; - }; - - return SqlServerTransactionLogs; - })(); - - v1.SqlServerChangeTables = (function() { - - /** - * Properties of a SqlServerChangeTables. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerChangeTables - */ - - /** - * Constructs a new SqlServerChangeTables. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerChangeTables. - * @implements ISqlServerChangeTables - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerChangeTables=} [properties] Properties to set - */ - function SqlServerChangeTables(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 SqlServerChangeTables instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {google.cloud.datastream.v1.ISqlServerChangeTables=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables instance - */ - SqlServerChangeTables.create = function create(properties) { - return new SqlServerChangeTables(properties); - }; - - /** - * Encodes the specified SqlServerChangeTables message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {google.cloud.datastream.v1.ISqlServerChangeTables} message SqlServerChangeTables message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerChangeTables.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SqlServerChangeTables message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {google.cloud.datastream.v1.ISqlServerChangeTables} message SqlServerChangeTables message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerChangeTables.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerChangeTables message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerChangeTables.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerChangeTables(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerChangeTables message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerChangeTables.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerChangeTables message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerChangeTables.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SqlServerChangeTables message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables - */ - SqlServerChangeTables.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerChangeTables) - return object; - return new $root.google.cloud.datastream.v1.SqlServerChangeTables(); - }; - - /** - * Creates a plain object from a SqlServerChangeTables message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {google.cloud.datastream.v1.SqlServerChangeTables} message SqlServerChangeTables - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerChangeTables.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SqlServerChangeTables to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @instance - * @returns {Object.} JSON object - */ - SqlServerChangeTables.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerChangeTables - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerChangeTables - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerChangeTables.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerChangeTables"; - }; - - return SqlServerChangeTables; - })(); - - v1.MysqlColumn = (function() { - - /** - * Properties of a MysqlColumn. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlColumn - * @property {string|null} [column] MysqlColumn column - * @property {string|null} [dataType] MysqlColumn dataType - * @property {number|null} [length] MysqlColumn length - * @property {string|null} [collation] MysqlColumn collation - * @property {boolean|null} [primaryKey] MysqlColumn primaryKey - * @property {boolean|null} [nullable] MysqlColumn nullable - * @property {number|null} [ordinalPosition] MysqlColumn ordinalPosition - * @property {number|null} [precision] MysqlColumn precision - * @property {number|null} [scale] MysqlColumn scale - */ - - /** - * Constructs a new MysqlColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlColumn. - * @implements IMysqlColumn - * @constructor - * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set - */ - function MysqlColumn(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]]; - } - - /** - * MysqlColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.column = ""; - - /** - * MysqlColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.dataType = ""; - - /** - * MysqlColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.length = 0; - - /** - * MysqlColumn collation. - * @member {string} collation - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.collation = ""; - - /** - * MysqlColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.primaryKey = false; - - /** - * MysqlColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.nullable = false; - - /** - * MysqlColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.ordinalPosition = 0; - - /** - * MysqlColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.precision = 0; - - /** - * MysqlColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.scale = 0; - - /** - * Creates a new MysqlColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn instance - */ - MysqlColumn.create = function create(properties) { - return new MysqlColumn(properties); - }; - - /** - * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.collation); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.ordinalPosition); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scale); - return writer; - }; - - /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.collation = reader.string(); - break; - } - case 5: { - message.primaryKey = reader.bool(); - break; - } - case 6: { - message.nullable = reader.bool(); - break; - } - case 7: { - message.ordinalPosition = reader.int32(); - break; - } - case 8: { - message.precision = reader.int32(); - break; - } - case 9: { - message.scale = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlColumn message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.collation != null && message.hasOwnProperty("collation")) - if (!$util.isString(message.collation)) - return "collation: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - return null; - }; - - /** - * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - */ - MysqlColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlColumn) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.collation != null) - message.collation = String(object.collation); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - return message; - }; - - /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.MysqlColumn} message MysqlColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.collation = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - object.precision = 0; - object.scale = 0; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.collation != null && message.hasOwnProperty("collation")) - object.collation = message.collation; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - return object; - }; - - /** - * Converts this MysqlColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - * @returns {Object.} JSON object - */ - MysqlColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlColumn"; - }; - - return MysqlColumn; - })(); - - v1.MysqlTable = (function() { - - /** - * Properties of a MysqlTable. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlTable - * @property {string|null} [table] MysqlTable table - * @property {Array.|null} [mysqlColumns] MysqlTable mysqlColumns - */ - - /** - * Constructs a new MysqlTable. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlTable. - * @implements IMysqlTable - * @constructor - * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set - */ - function MysqlTable(properties) { - this.mysqlColumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.MysqlTable - * @instance - */ - MysqlTable.prototype.table = ""; - - /** - * MysqlTable mysqlColumns. - * @member {Array.} mysqlColumns - * @memberof google.cloud.datastream.v1.MysqlTable - * @instance - */ - MysqlTable.prototype.mysqlColumns = $util.emptyArray; - - /** - * Creates a new MysqlTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable instance - */ - MysqlTable.create = function create(properties) { - return new MysqlTable(properties); - }; - - /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.mysqlColumns != null && message.mysqlColumns.length) - for (var i = 0; i < message.mysqlColumns.length; ++i) - $root.google.cloud.datastream.v1.MysqlColumn.encode(message.mysqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - if (!(message.mysqlColumns && message.mysqlColumns.length)) - message.mysqlColumns = []; - message.mysqlColumns.push($root.google.cloud.datastream.v1.MysqlColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlTable message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.mysqlColumns != null && message.hasOwnProperty("mysqlColumns")) { - if (!Array.isArray(message.mysqlColumns)) - return "mysqlColumns: array expected"; - for (var i = 0; i < message.mysqlColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlColumn.verify(message.mysqlColumns[i]); - if (error) - return "mysqlColumns." + error; - } - } - return null; - }; - - /** - * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable - */ - MysqlTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlTable) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlTable(); - if (object.table != null) - message.table = String(object.table); - if (object.mysqlColumns) { - if (!Array.isArray(object.mysqlColumns)) - throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: array expected"); - message.mysqlColumns = []; - for (var i = 0; i < object.mysqlColumns.length; ++i) { - if (typeof object.mysqlColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: object expected"); - message.mysqlColumns[i] = $root.google.cloud.datastream.v1.MysqlColumn.fromObject(object.mysqlColumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.MysqlTable} message MysqlTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.mysqlColumns && message.mysqlColumns.length) { - object.mysqlColumns = []; - for (var j = 0; j < message.mysqlColumns.length; ++j) - object.mysqlColumns[j] = $root.google.cloud.datastream.v1.MysqlColumn.toObject(message.mysqlColumns[j], options); - } - return object; - }; - - /** - * Converts this MysqlTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlTable - * @instance - * @returns {Object.} JSON object - */ - MysqlTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlTable"; - }; - - return MysqlTable; - })(); - - v1.MysqlDatabase = (function() { - - /** - * Properties of a MysqlDatabase. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlDatabase - * @property {string|null} [database] MysqlDatabase database - * @property {Array.|null} [mysqlTables] MysqlDatabase mysqlTables - */ - - /** - * Constructs a new MysqlDatabase. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlDatabase. - * @implements IMysqlDatabase - * @constructor - * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set - */ - function MysqlDatabase(properties) { - this.mysqlTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlDatabase database. - * @member {string} database - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @instance - */ - MysqlDatabase.prototype.database = ""; - - /** - * MysqlDatabase mysqlTables. - * @member {Array.} mysqlTables - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @instance - */ - MysqlDatabase.prototype.mysqlTables = $util.emptyArray; - - /** - * Creates a new MysqlDatabase instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase instance - */ - MysqlDatabase.create = function create(properties) { - return new MysqlDatabase(properties); - }; - - /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlDatabase.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.mysqlTables != null && message.mysqlTables.length) - for (var i = 0; i < message.mysqlTables.length; ++i) - $root.google.cloud.datastream.v1.MysqlTable.encode(message.mysqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlDatabase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlDatabase.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlDatabase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.database = reader.string(); - break; - } - case 2: { - if (!(message.mysqlTables && message.mysqlTables.length)) - message.mysqlTables = []; - message.mysqlTables.push($root.google.cloud.datastream.v1.MysqlTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlDatabase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlDatabase message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlDatabase.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.mysqlTables != null && message.hasOwnProperty("mysqlTables")) { - if (!Array.isArray(message.mysqlTables)) - return "mysqlTables: array expected"; - for (var i = 0; i < message.mysqlTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlTable.verify(message.mysqlTables[i]); - if (error) - return "mysqlTables." + error; - } - } - return null; - }; - - /** - * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase - */ - MysqlDatabase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlDatabase) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlDatabase(); - if (object.database != null) - message.database = String(object.database); - if (object.mysqlTables) { - if (!Array.isArray(object.mysqlTables)) - throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: array expected"); - message.mysqlTables = []; - for (var i = 0; i < object.mysqlTables.length; ++i) { - if (typeof object.mysqlTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: object expected"); - message.mysqlTables[i] = $root.google.cloud.datastream.v1.MysqlTable.fromObject(object.mysqlTables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1.MysqlDatabase} message MysqlDatabase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlDatabase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlTables = []; - if (options.defaults) - object.database = ""; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.mysqlTables && message.mysqlTables.length) { - object.mysqlTables = []; - for (var j = 0; j < message.mysqlTables.length; ++j) - object.mysqlTables[j] = $root.google.cloud.datastream.v1.MysqlTable.toObject(message.mysqlTables[j], options); - } - return object; - }; - - /** - * Converts this MysqlDatabase to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @instance - * @returns {Object.} JSON object - */ - MysqlDatabase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlDatabase - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlDatabase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlDatabase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlDatabase"; - }; - - return MysqlDatabase; - })(); - - v1.MysqlRdbms = (function() { - - /** - * Properties of a MysqlRdbms. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlRdbms - * @property {Array.|null} [mysqlDatabases] MysqlRdbms mysqlDatabases - */ - - /** - * Constructs a new MysqlRdbms. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlRdbms. - * @implements IMysqlRdbms - * @constructor - * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set - */ - function MysqlRdbms(properties) { - this.mysqlDatabases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlRdbms mysqlDatabases. - * @member {Array.} mysqlDatabases - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @instance - */ - MysqlRdbms.prototype.mysqlDatabases = $util.emptyArray; - - /** - * Creates a new MysqlRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms instance - */ - MysqlRdbms.create = function create(properties) { - return new MysqlRdbms(properties); - }; - - /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mysqlDatabases != null && message.mysqlDatabases.length) - for (var i = 0; i < message.mysqlDatabases.length; ++i) - $root.google.cloud.datastream.v1.MysqlDatabase.encode(message.mysqlDatabases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.mysqlDatabases && message.mysqlDatabases.length)) - message.mysqlDatabases = []; - message.mysqlDatabases.push($root.google.cloud.datastream.v1.MysqlDatabase.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mysqlDatabases != null && message.hasOwnProperty("mysqlDatabases")) { - if (!Array.isArray(message.mysqlDatabases)) - return "mysqlDatabases: array expected"; - for (var i = 0; i < message.mysqlDatabases.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlDatabase.verify(message.mysqlDatabases[i]); - if (error) - return "mysqlDatabases." + error; - } - } - return null; - }; - - /** - * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms - */ - MysqlRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlRdbms) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlRdbms(); - if (object.mysqlDatabases) { - if (!Array.isArray(object.mysqlDatabases)) - throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: array expected"); - message.mysqlDatabases = []; - for (var i = 0; i < object.mysqlDatabases.length; ++i) { - if (typeof object.mysqlDatabases[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: object expected"); - message.mysqlDatabases[i] = $root.google.cloud.datastream.v1.MysqlDatabase.fromObject(object.mysqlDatabases[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1.MysqlRdbms} message MysqlRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlDatabases = []; - if (message.mysqlDatabases && message.mysqlDatabases.length) { - object.mysqlDatabases = []; - for (var j = 0; j < message.mysqlDatabases.length; ++j) - object.mysqlDatabases[j] = $root.google.cloud.datastream.v1.MysqlDatabase.toObject(message.mysqlDatabases[j], options); - } - return object; - }; - - /** - * Converts this MysqlRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @instance - * @returns {Object.} JSON object - */ - MysqlRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlRdbms"; - }; - - return MysqlRdbms; - })(); - - v1.MysqlSourceConfig = (function() { - - /** - * Properties of a MysqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlSourceConfig - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [includeObjects] MysqlSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [excludeObjects] MysqlSourceConfig excludeObjects - * @property {number|null} [maxConcurrentCdcTasks] MysqlSourceConfig maxConcurrentCdcTasks - * @property {number|null} [maxConcurrentBackfillTasks] MysqlSourceConfig maxConcurrentBackfillTasks - * @property {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null} [binaryLogPosition] MysqlSourceConfig binaryLogPosition - * @property {google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null} [gtid] MysqlSourceConfig gtid - */ - - /** - * Constructs a new MysqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlSourceConfig. - * @implements IMysqlSourceConfig - * @constructor - * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set - */ - function MysqlSourceConfig(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]]; - } - - /** - * MysqlSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.includeObjects = null; - - /** - * MysqlSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.excludeObjects = null; - - /** - * MysqlSourceConfig maxConcurrentCdcTasks. - * @member {number} maxConcurrentCdcTasks - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.maxConcurrentCdcTasks = 0; - - /** - * MysqlSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - - /** - * MysqlSourceConfig binaryLogPosition. - * @member {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null|undefined} binaryLogPosition - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.binaryLogPosition = null; - - /** - * MysqlSourceConfig gtid. - * @member {google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null|undefined} gtid - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.gtid = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MysqlSourceConfig cdcMethod. - * @member {"binaryLogPosition"|"gtid"|undefined} cdcMethod - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - Object.defineProperty(MysqlSourceConfig.prototype, "cdcMethod", { - get: $util.oneOfGetter($oneOfFields = ["binaryLogPosition", "gtid"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MysqlSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig instance - */ - MysqlSourceConfig.create = function create(properties) { - return new MysqlSourceConfig(properties); - }; - - /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); - if (message.binaryLogPosition != null && Object.hasOwnProperty.call(message, "binaryLogPosition")) - $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.encode(message.binaryLogPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.encode(message.gtid, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxConcurrentCdcTasks = reader.int32(); - break; - } - case 4: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - case 101: { - message.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.decode(reader, reader.uint32()); - break; - } - case 102: { - message.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - if (!$util.isInteger(message.maxConcurrentCdcTasks)) - return "maxConcurrentCdcTasks: integer expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - if (message.binaryLogPosition != null && message.hasOwnProperty("binaryLogPosition")) { - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify(message.binaryLogPosition); - if (error) - return "binaryLogPosition." + error; - } - } - if (message.gtid != null && message.hasOwnProperty("gtid")) { - if (properties.cdcMethod === 1) - return "cdcMethod: multiple values"; - properties.cdcMethod = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify(message.gtid); - if (error) - return "gtid." + error; - } - } - return null; - }; - - /** - * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig - */ - MysqlSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.excludeObjects); - } - if (object.maxConcurrentCdcTasks != null) - message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - if (object.binaryLogPosition != null) { - if (typeof object.binaryLogPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.binaryLogPosition: object expected"); - message.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.fromObject(object.binaryLogPosition); - } - if (object.gtid != null) { - if (typeof object.gtid !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.gtid: object expected"); - message.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.fromObject(object.gtid); - } - return message; - }; - - /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig} message MysqlSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.maxConcurrentCdcTasks = 0; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.excludeObjects, options); - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - if (message.binaryLogPosition != null && message.hasOwnProperty("binaryLogPosition")) { - object.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.toObject(message.binaryLogPosition, options); - if (options.oneofs) - object.cdcMethod = "binaryLogPosition"; - } - if (message.gtid != null && message.hasOwnProperty("gtid")) { - object.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.toObject(message.gtid, options); - if (options.oneofs) - object.cdcMethod = "gtid"; - } - return object; - }; - - /** - * Converts this MysqlSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - * @returns {Object.} JSON object - */ - MysqlSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig"; - }; - - MysqlSourceConfig.BinaryLogPosition = (function() { - - /** - * Properties of a BinaryLogPosition. - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @interface IBinaryLogPosition - */ - - /** - * Constructs a new BinaryLogPosition. - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @classdesc Represents a BinaryLogPosition. - * @implements IBinaryLogPosition - * @constructor - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition=} [properties] Properties to set - */ - function BinaryLogPosition(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 BinaryLogPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition instance - */ - BinaryLogPosition.create = function create(properties) { - return new BinaryLogPosition(properties); - }; - - /** - * Encodes the specified BinaryLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition} message BinaryLogPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryLogPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified BinaryLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition} message BinaryLogPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryLogPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinaryLogPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryLogPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinaryLogPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryLogPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinaryLogPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinaryLogPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a BinaryLogPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition - */ - BinaryLogPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition) - return object; - return new $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition(); - }; - - /** - * Creates a plain object from a BinaryLogPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} message BinaryLogPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinaryLogPosition.toObject = function toObject() { - return {}; - }; - - /** - * Converts this BinaryLogPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @instance - * @returns {Object.} JSON object - */ - BinaryLogPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BinaryLogPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BinaryLogPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition"; - }; - - return BinaryLogPosition; - })(); - - MysqlSourceConfig.Gtid = (function() { - - /** - * Properties of a Gtid. - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @interface IGtid - */ - - /** - * Constructs a new Gtid. - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @classdesc Represents a Gtid. - * @implements IGtid - * @constructor - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid=} [properties] Properties to set - */ - function Gtid(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 Gtid instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid instance - */ - Gtid.create = function create(properties) { - return new Gtid(properties); - }; - - /** - * Encodes the specified Gtid message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid} message Gtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Gtid.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Gtid message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid} message Gtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Gtid.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Gtid message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Gtid.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Gtid message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Gtid.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Gtid message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Gtid.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a Gtid message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid - */ - Gtid.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid) - return object; - return new $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid(); - }; - - /** - * Creates a plain object from a Gtid message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} message Gtid - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Gtid.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Gtid to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @instance - * @returns {Object.} JSON object - */ - Gtid.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Gtid - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Gtid.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig.Gtid"; - }; - - return Gtid; - })(); - - return MysqlSourceConfig; - })(); - - v1.SourceConfig = (function() { - - /** - * Properties of a SourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface ISourceConfig - * @property {string|null} [sourceConnectionProfile] SourceConfig sourceConnectionProfile - * @property {google.cloud.datastream.v1.IOracleSourceConfig|null} [oracleSourceConfig] SourceConfig oracleSourceConfig - * @property {google.cloud.datastream.v1.IMysqlSourceConfig|null} [mysqlSourceConfig] SourceConfig mysqlSourceConfig - * @property {google.cloud.datastream.v1.IPostgresqlSourceConfig|null} [postgresqlSourceConfig] SourceConfig postgresqlSourceConfig - * @property {google.cloud.datastream.v1.ISqlServerSourceConfig|null} [sqlServerSourceConfig] SourceConfig sqlServerSourceConfig - */ - - /** - * Constructs a new SourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SourceConfig. - * @implements ISourceConfig - * @constructor - * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set - */ - function SourceConfig(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]]; - } - - /** - * SourceConfig sourceConnectionProfile. - * @member {string} sourceConnectionProfile - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - SourceConfig.prototype.sourceConnectionProfile = ""; - - /** - * SourceConfig oracleSourceConfig. - * @member {google.cloud.datastream.v1.IOracleSourceConfig|null|undefined} oracleSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - SourceConfig.prototype.oracleSourceConfig = null; - - /** - * SourceConfig mysqlSourceConfig. - * @member {google.cloud.datastream.v1.IMysqlSourceConfig|null|undefined} mysqlSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - SourceConfig.prototype.mysqlSourceConfig = null; - - /** - * SourceConfig postgresqlSourceConfig. - * @member {google.cloud.datastream.v1.IPostgresqlSourceConfig|null|undefined} postgresqlSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - SourceConfig.prototype.postgresqlSourceConfig = null; - - /** - * SourceConfig sqlServerSourceConfig. - * @member {google.cloud.datastream.v1.ISqlServerSourceConfig|null|undefined} sqlServerSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - SourceConfig.prototype.sqlServerSourceConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SourceConfig sourceStreamConfig. - * @member {"oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"|"sqlServerSourceConfig"|undefined} sourceStreamConfig - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - */ - Object.defineProperty(SourceConfig.prototype, "sourceStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["oracleSourceConfig", "mysqlSourceConfig", "postgresqlSourceConfig", "sqlServerSourceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig instance - */ - SourceConfig.create = function create(properties) { - return new SourceConfig(properties); - }; - - /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceConnectionProfile != null && Object.hasOwnProperty.call(message, "sourceConnectionProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceConnectionProfile); - if (message.oracleSourceConfig != null && Object.hasOwnProperty.call(message, "oracleSourceConfig")) - $root.google.cloud.datastream.v1.OracleSourceConfig.encode(message.oracleSourceConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlSourceConfig != null && Object.hasOwnProperty.call(message, "mysqlSourceConfig")) - $root.google.cloud.datastream.v1.MysqlSourceConfig.encode(message.mysqlSourceConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.postgresqlSourceConfig != null && Object.hasOwnProperty.call(message, "postgresqlSourceConfig")) - $root.google.cloud.datastream.v1.PostgresqlSourceConfig.encode(message.postgresqlSourceConfig, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.sqlServerSourceConfig != null && Object.hasOwnProperty.call(message, "sqlServerSourceConfig")) - $root.google.cloud.datastream.v1.SqlServerSourceConfig.encode(message.sqlServerSourceConfig, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceConnectionProfile = reader.string(); - break; - } - case 100: { - message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.decode(reader, reader.uint32()); - break; - } - case 102: { - message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.decode(reader, reader.uint32()); - break; - } - case 103: { - message.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) - if (!$util.isString(message.sourceConnectionProfile)) - return "sourceConnectionProfile: string expected"; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.verify(message.oracleSourceConfig); - if (error) - return "oracleSourceConfig." + error; - } - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.verify(message.mysqlSourceConfig); - if (error) - return "mysqlSourceConfig." + error; - } - } - if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.verify(message.postgresqlSourceConfig); - if (error) - return "postgresqlSourceConfig." + error; - } - } - if (message.sqlServerSourceConfig != null && message.hasOwnProperty("sqlServerSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerSourceConfig.verify(message.sqlServerSourceConfig); - if (error) - return "sqlServerSourceConfig." + error; - } - } - return null; - }; - - /** - * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig - */ - SourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.SourceConfig(); - if (object.sourceConnectionProfile != null) - message.sourceConnectionProfile = String(object.sourceConnectionProfile); - if (object.oracleSourceConfig != null) { - if (typeof object.oracleSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.oracleSourceConfig: object expected"); - message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.fromObject(object.oracleSourceConfig); - } - if (object.mysqlSourceConfig != null) { - if (typeof object.mysqlSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.mysqlSourceConfig: object expected"); - message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.fromObject(object.mysqlSourceConfig); - } - if (object.postgresqlSourceConfig != null) { - if (typeof object.postgresqlSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.postgresqlSourceConfig: object expected"); - message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.fromObject(object.postgresqlSourceConfig); - } - if (object.sqlServerSourceConfig != null) { - if (typeof object.sqlServerSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.sqlServerSourceConfig: object expected"); - message.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.fromObject(object.sqlServerSourceConfig); - } - return message; - }; - - /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {google.cloud.datastream.v1.SourceConfig} message SourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sourceConnectionProfile = ""; - if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) - object.sourceConnectionProfile = message.sourceConnectionProfile; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - object.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.toObject(message.oracleSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "oracleSourceConfig"; - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - object.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.toObject(message.mysqlSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "mysqlSourceConfig"; - } - if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { - object.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.toObject(message.postgresqlSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "postgresqlSourceConfig"; - } - if (message.sqlServerSourceConfig != null && message.hasOwnProperty("sqlServerSourceConfig")) { - object.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.toObject(message.sqlServerSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "sqlServerSourceConfig"; - } - return object; - }; - - /** - * Converts this SourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceConfig - * @instance - * @returns {Object.} JSON object - */ - SourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceConfig"; - }; - - return SourceConfig; - })(); - - v1.AvroFileFormat = (function() { - - /** - * Properties of an AvroFileFormat. - * @memberof google.cloud.datastream.v1 - * @interface IAvroFileFormat - */ - - /** - * Constructs a new AvroFileFormat. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an AvroFileFormat. - * @implements IAvroFileFormat - * @constructor - * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set - */ - function AvroFileFormat(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 AvroFileFormat instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat instance - */ - AvroFileFormat.create = function create(properties) { - return new AvroFileFormat(properties); - }; - - /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFileFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFileFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFileFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.AvroFileFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFileFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroFileFormat message. - * @function verify - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroFileFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AvroFileFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat - */ - AvroFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.AvroFileFormat) - return object; - return new $root.google.cloud.datastream.v1.AvroFileFormat(); - }; - - /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1.AvroFileFormat} message AvroFileFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroFileFormat.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AvroFileFormat to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @instance - * @returns {Object.} JSON object - */ - AvroFileFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroFileFormat - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.AvroFileFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.AvroFileFormat"; - }; - - return AvroFileFormat; - })(); - - v1.JsonFileFormat = (function() { - - /** - * Properties of a JsonFileFormat. - * @memberof google.cloud.datastream.v1 - * @interface IJsonFileFormat - * @property {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null} [schemaFileFormat] JsonFileFormat schemaFileFormat - * @property {google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null} [compression] JsonFileFormat compression - */ - - /** - * Constructs a new JsonFileFormat. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a JsonFileFormat. - * @implements IJsonFileFormat - * @constructor - * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set - */ - function JsonFileFormat(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]]; - } - - /** - * JsonFileFormat schemaFileFormat. - * @member {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat} schemaFileFormat - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @instance - */ - JsonFileFormat.prototype.schemaFileFormat = 0; - - /** - * JsonFileFormat compression. - * @member {google.cloud.datastream.v1.JsonFileFormat.JsonCompression} compression - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @instance - */ - JsonFileFormat.prototype.compression = 0; - - /** - * Creates a new JsonFileFormat instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat instance - */ - JsonFileFormat.create = function create(properties) { - return new JsonFileFormat(properties); - }; - - /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonFileFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schemaFileFormat != null && Object.hasOwnProperty.call(message, "schemaFileFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.schemaFileFormat); - if (message.compression != null && Object.hasOwnProperty.call(message, "compression")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compression); - return writer; - }; - - /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonFileFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonFileFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.JsonFileFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schemaFileFormat = reader.int32(); - break; - } - case 2: { - message.compression = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonFileFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonFileFormat message. - * @function verify - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonFileFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - switch (message.schemaFileFormat) { - default: - return "schemaFileFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.compression != null && message.hasOwnProperty("compression")) - switch (message.compression) { - default: - return "compression: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat - */ - JsonFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.JsonFileFormat) - return object; - var message = new $root.google.cloud.datastream.v1.JsonFileFormat(); - switch (object.schemaFileFormat) { - default: - if (typeof object.schemaFileFormat === "number") { - message.schemaFileFormat = object.schemaFileFormat; - break; - } - break; - case "SCHEMA_FILE_FORMAT_UNSPECIFIED": - case 0: - message.schemaFileFormat = 0; - break; - case "NO_SCHEMA_FILE": - case 1: - message.schemaFileFormat = 1; - break; - case "AVRO_SCHEMA_FILE": - case 2: - message.schemaFileFormat = 2; - break; - } - switch (object.compression) { - default: - if (typeof object.compression === "number") { - message.compression = object.compression; - break; - } - break; - case "JSON_COMPRESSION_UNSPECIFIED": - case 0: - message.compression = 0; - break; - case "NO_COMPRESSION": - case 1: - message.compression = 1; - break; - case "GZIP": - case 2: - message.compression = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1.JsonFileFormat} message JsonFileFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonFileFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schemaFileFormat = options.enums === String ? "SCHEMA_FILE_FORMAT_UNSPECIFIED" : 0; - object.compression = options.enums === String ? "JSON_COMPRESSION_UNSPECIFIED" : 0; - } - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - object.schemaFileFormat = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] === undefined ? message.schemaFileFormat : $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] : message.schemaFileFormat; - if (message.compression != null && message.hasOwnProperty("compression")) - object.compression = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] === undefined ? message.compression : $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] : message.compression; - return object; - }; - - /** - * Converts this JsonFileFormat to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @instance - * @returns {Object.} JSON object - */ - JsonFileFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonFileFormat - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.JsonFileFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.JsonFileFormat"; - }; - - /** - * SchemaFileFormat enum. - * @name google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat - * @enum {number} - * @property {number} SCHEMA_FILE_FORMAT_UNSPECIFIED=0 SCHEMA_FILE_FORMAT_UNSPECIFIED value - * @property {number} NO_SCHEMA_FILE=1 NO_SCHEMA_FILE value - * @property {number} AVRO_SCHEMA_FILE=2 AVRO_SCHEMA_FILE value - */ - JsonFileFormat.SchemaFileFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_FILE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_SCHEMA_FILE"] = 1; - values[valuesById[2] = "AVRO_SCHEMA_FILE"] = 2; - return values; - })(); - - /** - * JsonCompression enum. - * @name google.cloud.datastream.v1.JsonFileFormat.JsonCompression - * @enum {number} - * @property {number} JSON_COMPRESSION_UNSPECIFIED=0 JSON_COMPRESSION_UNSPECIFIED value - * @property {number} NO_COMPRESSION=1 NO_COMPRESSION value - * @property {number} GZIP=2 GZIP value - */ - JsonFileFormat.JsonCompression = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_COMPRESSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_COMPRESSION"] = 1; - values[valuesById[2] = "GZIP"] = 2; - return values; - })(); - - return JsonFileFormat; - })(); - - v1.GcsDestinationConfig = (function() { - - /** - * Properties of a GcsDestinationConfig. - * @memberof google.cloud.datastream.v1 - * @interface IGcsDestinationConfig - * @property {string|null} [path] GcsDestinationConfig path - * @property {number|null} [fileRotationMb] GcsDestinationConfig fileRotationMb - * @property {google.protobuf.IDuration|null} [fileRotationInterval] GcsDestinationConfig fileRotationInterval - * @property {google.cloud.datastream.v1.IAvroFileFormat|null} [avroFileFormat] GcsDestinationConfig avroFileFormat - * @property {google.cloud.datastream.v1.IJsonFileFormat|null} [jsonFileFormat] GcsDestinationConfig jsonFileFormat - */ - - /** - * Constructs a new GcsDestinationConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GcsDestinationConfig. - * @implements IGcsDestinationConfig - * @constructor - * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set - */ - function GcsDestinationConfig(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]]; - } - - /** - * GcsDestinationConfig path. - * @member {string} path - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.path = ""; - - /** - * GcsDestinationConfig fileRotationMb. - * @member {number} fileRotationMb - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationMb = 0; - - /** - * GcsDestinationConfig fileRotationInterval. - * @member {google.protobuf.IDuration|null|undefined} fileRotationInterval - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationInterval = null; - - /** - * GcsDestinationConfig avroFileFormat. - * @member {google.cloud.datastream.v1.IAvroFileFormat|null|undefined} avroFileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.avroFileFormat = null; - - /** - * GcsDestinationConfig jsonFileFormat. - * @member {google.cloud.datastream.v1.IJsonFileFormat|null|undefined} jsonFileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.jsonFileFormat = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GcsDestinationConfig fileFormat. - * @member {"avroFileFormat"|"jsonFileFormat"|undefined} fileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - Object.defineProperty(GcsDestinationConfig.prototype, "fileFormat", { - get: $util.oneOfGetter($oneOfFields = ["avroFileFormat", "jsonFileFormat"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GcsDestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig instance - */ - GcsDestinationConfig.create = function create(properties) { - return new GcsDestinationConfig(properties); - }; - - /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestinationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.fileRotationMb != null && Object.hasOwnProperty.call(message, "fileRotationMb")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileRotationMb); - if (message.fileRotationInterval != null && Object.hasOwnProperty.call(message, "fileRotationInterval")) - $root.google.protobuf.Duration.encode(message.fileRotationInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.avroFileFormat != null && Object.hasOwnProperty.call(message, "avroFileFormat")) - $root.google.cloud.datastream.v1.AvroFileFormat.encode(message.avroFileFormat, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.jsonFileFormat != null && Object.hasOwnProperty.call(message, "jsonFileFormat")) - $root.google.cloud.datastream.v1.JsonFileFormat.encode(message.jsonFileFormat, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestinationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GcsDestinationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.path = reader.string(); - break; - } - case 2: { - message.fileRotationMb = reader.int32(); - break; - } - case 3: { - message.fileRotationInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 100: { - message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.decode(reader, reader.uint32()); - break; - } - case 101: { - message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestinationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsDestinationConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsDestinationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - if (!$util.isInteger(message.fileRotationMb)) - return "fileRotationMb: integer expected"; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) { - var error = $root.google.protobuf.Duration.verify(message.fileRotationInterval); - if (error) - return "fileRotationInterval." + error; - } - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1.AvroFileFormat.verify(message.avroFileFormat); - if (error) - return "avroFileFormat." + error; - } - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - if (properties.fileFormat === 1) - return "fileFormat: multiple values"; - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1.JsonFileFormat.verify(message.jsonFileFormat); - if (error) - return "jsonFileFormat." + error; - } - } - return null; - }; - - /** - * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig - */ - GcsDestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GcsDestinationConfig) - return object; - var message = new $root.google.cloud.datastream.v1.GcsDestinationConfig(); - if (object.path != null) - message.path = String(object.path); - if (object.fileRotationMb != null) - message.fileRotationMb = object.fileRotationMb | 0; - if (object.fileRotationInterval != null) { - if (typeof object.fileRotationInterval !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.fileRotationInterval: object expected"); - message.fileRotationInterval = $root.google.protobuf.Duration.fromObject(object.fileRotationInterval); - } - if (object.avroFileFormat != null) { - if (typeof object.avroFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.avroFileFormat: object expected"); - message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.fromObject(object.avroFileFormat); - } - if (object.jsonFileFormat != null) { - if (typeof object.jsonFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.jsonFileFormat: object expected"); - message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.fromObject(object.jsonFileFormat); - } - return message; - }; - - /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1.GcsDestinationConfig} message GcsDestinationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsDestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - object.fileRotationMb = 0; - object.fileRotationInterval = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - object.fileRotationMb = message.fileRotationMb; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) - object.fileRotationInterval = $root.google.protobuf.Duration.toObject(message.fileRotationInterval, options); - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - object.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.toObject(message.avroFileFormat, options); - if (options.oneofs) - object.fileFormat = "avroFileFormat"; - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - object.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.toObject(message.jsonFileFormat, options); - if (options.oneofs) - object.fileFormat = "jsonFileFormat"; - } - return object; - }; - - /** - * Converts this GcsDestinationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - * @returns {Object.} JSON object - */ - GcsDestinationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsDestinationConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.GcsDestinationConfig"; - }; - - return GcsDestinationConfig; - })(); - - v1.BigQueryDestinationConfig = (function() { - - /** - * Properties of a BigQueryDestinationConfig. - * @memberof google.cloud.datastream.v1 - * @interface IBigQueryDestinationConfig - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null} [singleTargetDataset] BigQueryDestinationConfig singleTargetDataset - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null} [sourceHierarchyDatasets] BigQueryDestinationConfig sourceHierarchyDatasets - * @property {google.protobuf.IDuration|null} [dataFreshness] BigQueryDestinationConfig dataFreshness - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null} [merge] BigQueryDestinationConfig merge - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null} [appendOnly] BigQueryDestinationConfig appendOnly - */ - - /** - * Constructs a new BigQueryDestinationConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BigQueryDestinationConfig. - * @implements IBigQueryDestinationConfig - * @constructor - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set - */ - function BigQueryDestinationConfig(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]]; - } - - /** - * BigQueryDestinationConfig singleTargetDataset. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null|undefined} singleTargetDataset - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.singleTargetDataset = null; - - /** - * BigQueryDestinationConfig sourceHierarchyDatasets. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null|undefined} sourceHierarchyDatasets - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.sourceHierarchyDatasets = null; - - /** - * BigQueryDestinationConfig dataFreshness. - * @member {google.protobuf.IDuration|null|undefined} dataFreshness - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.dataFreshness = null; - - /** - * BigQueryDestinationConfig merge. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null|undefined} merge - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.merge = null; - - /** - * BigQueryDestinationConfig appendOnly. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null|undefined} appendOnly - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.appendOnly = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryDestinationConfig datasetConfig. - * @member {"singleTargetDataset"|"sourceHierarchyDatasets"|undefined} datasetConfig - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - Object.defineProperty(BigQueryDestinationConfig.prototype, "datasetConfig", { - get: $util.oneOfGetter($oneOfFields = ["singleTargetDataset", "sourceHierarchyDatasets"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BigQueryDestinationConfig writeMode. - * @member {"merge"|"appendOnly"|undefined} writeMode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - Object.defineProperty(BigQueryDestinationConfig.prototype, "writeMode", { - get: $util.oneOfGetter($oneOfFields = ["merge", "appendOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BigQueryDestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig instance - */ - BigQueryDestinationConfig.create = function create(properties) { - return new BigQueryDestinationConfig(properties); - }; - - /** - * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestinationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.singleTargetDataset != null && Object.hasOwnProperty.call(message, "singleTargetDataset")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.encode(message.singleTargetDataset, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.sourceHierarchyDatasets != null && Object.hasOwnProperty.call(message, "sourceHierarchyDatasets")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.encode(message.sourceHierarchyDatasets, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - if (message.dataFreshness != null && Object.hasOwnProperty.call(message, "dataFreshness")) - $root.google.protobuf.Duration.encode(message.dataFreshness, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); - if (message.merge != null && Object.hasOwnProperty.call(message, "merge")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.encode(message.merge, writer.uint32(/* id 301, wireType 2 =*/2410).fork()).ldelim(); - if (message.appendOnly != null && Object.hasOwnProperty.call(message, "appendOnly")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.encode(message.appendOnly, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestinationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 201: { - message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.decode(reader, reader.uint32()); - break; - } - case 202: { - message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.decode(reader, reader.uint32()); - break; - } - case 300: { - message.dataFreshness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 301: { - message.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.decode(reader, reader.uint32()); - break; - } - case 302: { - message.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestinationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDestinationConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDestinationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { - properties.datasetConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify(message.singleTargetDataset); - if (error) - return "singleTargetDataset." + error; - } - } - if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { - if (properties.datasetConfig === 1) - return "datasetConfig: multiple values"; - properties.datasetConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify(message.sourceHierarchyDatasets); - if (error) - return "sourceHierarchyDatasets." + error; - } - } - if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) { - var error = $root.google.protobuf.Duration.verify(message.dataFreshness); - if (error) - return "dataFreshness." + error; - } - if (message.merge != null && message.hasOwnProperty("merge")) { - properties.writeMode = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify(message.merge); - if (error) - return "merge." + error; - } - } - if (message.appendOnly != null && message.hasOwnProperty("appendOnly")) { - if (properties.writeMode === 1) - return "writeMode: multiple values"; - properties.writeMode = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify(message.appendOnly); - if (error) - return "appendOnly." + error; - } - } - return null; - }; - - /** - * Creates a BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig - */ - BigQueryDestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig(); - if (object.singleTargetDataset != null) { - if (typeof object.singleTargetDataset !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.singleTargetDataset: object expected"); - message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.fromObject(object.singleTargetDataset); - } - if (object.sourceHierarchyDatasets != null) { - if (typeof object.sourceHierarchyDatasets !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.sourceHierarchyDatasets: object expected"); - message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.fromObject(object.sourceHierarchyDatasets); - } - if (object.dataFreshness != null) { - if (typeof object.dataFreshness !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.dataFreshness: object expected"); - message.dataFreshness = $root.google.protobuf.Duration.fromObject(object.dataFreshness); - } - if (object.merge != null) { - if (typeof object.merge !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.merge: object expected"); - message.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.fromObject(object.merge); - } - if (object.appendOnly != null) { - if (typeof object.appendOnly !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.appendOnly: object expected"); - message.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.fromObject(object.appendOnly); - } - return message; - }; - - /** - * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig} message BigQueryDestinationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dataFreshness = null; - if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { - object.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.toObject(message.singleTargetDataset, options); - if (options.oneofs) - object.datasetConfig = "singleTargetDataset"; - } - if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { - object.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.toObject(message.sourceHierarchyDatasets, options); - if (options.oneofs) - object.datasetConfig = "sourceHierarchyDatasets"; - } - if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) - object.dataFreshness = $root.google.protobuf.Duration.toObject(message.dataFreshness, options); - if (message.merge != null && message.hasOwnProperty("merge")) { - object.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.toObject(message.merge, options); - if (options.oneofs) - object.writeMode = "merge"; - } - if (message.appendOnly != null && message.hasOwnProperty("appendOnly")) { - object.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.toObject(message.appendOnly, options); - if (options.oneofs) - object.writeMode = "appendOnly"; - } - return object; - }; - - /** - * Converts this BigQueryDestinationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - * @returns {Object.} JSON object - */ - BigQueryDestinationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDestinationConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig"; - }; - - BigQueryDestinationConfig.SingleTargetDataset = (function() { - - /** - * Properties of a SingleTargetDataset. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface ISingleTargetDataset - * @property {string|null} [datasetId] SingleTargetDataset datasetId - */ - - /** - * Constructs a new SingleTargetDataset. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents a SingleTargetDataset. - * @implements ISingleTargetDataset - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set - */ - function SingleTargetDataset(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]]; - } - - /** - * SingleTargetDataset datasetId. - * @member {string} datasetId - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @instance - */ - SingleTargetDataset.prototype.datasetId = ""; - - /** - * Creates a new SingleTargetDataset instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset instance - */ - SingleTargetDataset.create = function create(properties) { - return new SingleTargetDataset(properties); - }; - - /** - * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleTargetDataset.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); - return writer; - }; - - /** - * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleTargetDataset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleTargetDataset.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.datasetId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleTargetDataset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleTargetDataset message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleTargetDataset.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"; - return null; - }; - - /** - * Creates a SingleTargetDataset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - */ - SingleTargetDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - return message; - }; - - /** - * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} message SingleTargetDataset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleTargetDataset.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetId = ""; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - return object; - }; - - /** - * Converts this SingleTargetDataset to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @instance - * @returns {Object.} JSON object - */ - SingleTargetDataset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SingleTargetDataset - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SingleTargetDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset"; - }; - - return SingleTargetDataset; - })(); - - BigQueryDestinationConfig.SourceHierarchyDatasets = (function() { - - /** - * Properties of a SourceHierarchyDatasets. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface ISourceHierarchyDatasets - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null} [datasetTemplate] SourceHierarchyDatasets datasetTemplate - */ - - /** - * Constructs a new SourceHierarchyDatasets. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents a SourceHierarchyDatasets. - * @implements ISourceHierarchyDatasets - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set - */ - function SourceHierarchyDatasets(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]]; - } - - /** - * SourceHierarchyDatasets datasetTemplate. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null|undefined} datasetTemplate - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @instance - */ - SourceHierarchyDatasets.prototype.datasetTemplate = null; - - /** - * Creates a new SourceHierarchyDatasets instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets instance - */ - SourceHierarchyDatasets.create = function create(properties) { - return new SourceHierarchyDatasets(properties); - }; - - /** - * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceHierarchyDatasets.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetTemplate != null && Object.hasOwnProperty.call(message, "datasetTemplate")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.encode(message.datasetTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceHierarchyDatasets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceHierarchyDatasets.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceHierarchyDatasets.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceHierarchyDatasets message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceHierarchyDatasets.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify(message.datasetTemplate); - if (error) - return "datasetTemplate." + error; - } - return null; - }; - - /** - * Creates a SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - */ - SourceHierarchyDatasets.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); - if (object.datasetTemplate != null) { - if (typeof object.datasetTemplate !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.datasetTemplate: object expected"); - message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.fromObject(object.datasetTemplate); - } - return message; - }; - - /** - * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} message SourceHierarchyDatasets - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceHierarchyDatasets.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetTemplate = null; - if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) - object.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.toObject(message.datasetTemplate, options); - return object; - }; - - /** - * Converts this SourceHierarchyDatasets to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @instance - * @returns {Object.} JSON object - */ - SourceHierarchyDatasets.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceHierarchyDatasets - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceHierarchyDatasets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets"; - }; - - SourceHierarchyDatasets.DatasetTemplate = (function() { - - /** - * Properties of a DatasetTemplate. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @interface IDatasetTemplate - * @property {string|null} [location] DatasetTemplate location - * @property {string|null} [datasetIdPrefix] DatasetTemplate datasetIdPrefix - * @property {string|null} [kmsKeyName] DatasetTemplate kmsKeyName - */ - - /** - * Constructs a new DatasetTemplate. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @classdesc Represents a DatasetTemplate. - * @implements IDatasetTemplate - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set - */ - function DatasetTemplate(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]]; - } - - /** - * DatasetTemplate location. - * @member {string} location - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.location = ""; - - /** - * DatasetTemplate datasetIdPrefix. - * @member {string} datasetIdPrefix - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.datasetIdPrefix = ""; - - /** - * DatasetTemplate kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.kmsKeyName = ""; - - /** - * Creates a new DatasetTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate instance - */ - DatasetTemplate.create = function create(properties) { - return new DatasetTemplate(properties); - }; - - /** - * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.datasetIdPrefix != null && Object.hasOwnProperty.call(message, "datasetIdPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdPrefix); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - return writer; - }; - - /** - * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetTemplate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = reader.string(); - break; - } - case 2: { - message.datasetIdPrefix = reader.string(); - break; - } - case 3: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatasetTemplate message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatasetTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) - if (!$util.isString(message.datasetIdPrefix)) - return "datasetIdPrefix: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - return null; - }; - - /** - * Creates a DatasetTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - */ - DatasetTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); - if (object.location != null) - message.location = String(object.location); - if (object.datasetIdPrefix != null) - message.datasetIdPrefix = String(object.datasetIdPrefix); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - return message; - }; - - /** - * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} message DatasetTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatasetTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = ""; - object.datasetIdPrefix = ""; - object.kmsKeyName = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) - object.datasetIdPrefix = message.datasetIdPrefix; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - return object; - }; - - /** - * Converts this DatasetTemplate to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - * @returns {Object.} JSON object - */ - DatasetTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatasetTemplate - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatasetTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate"; - }; - - return DatasetTemplate; - })(); - - return SourceHierarchyDatasets; - })(); - - BigQueryDestinationConfig.AppendOnly = (function() { - - /** - * Properties of an AppendOnly. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface IAppendOnly - */ - - /** - * Constructs a new AppendOnly. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents an AppendOnly. - * @implements IAppendOnly - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly=} [properties] Properties to set - */ - function AppendOnly(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 AppendOnly instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly instance - */ - AppendOnly.create = function create(properties) { - return new AppendOnly(properties); - }; - - /** - * Encodes the specified AppendOnly message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly} message AppendOnly message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppendOnly.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AppendOnly message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly} message AppendOnly message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppendOnly.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppendOnly message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppendOnly.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppendOnly message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppendOnly.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppendOnly message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppendOnly.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AppendOnly message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly - */ - AppendOnly.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly) - return object; - return new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly(); - }; - - /** - * Creates a plain object from an AppendOnly message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} message AppendOnly - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppendOnly.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AppendOnly to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @instance - * @returns {Object.} JSON object - */ - AppendOnly.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppendOnly - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppendOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly"; - }; - - return AppendOnly; - })(); - - BigQueryDestinationConfig.Merge = (function() { - - /** - * Properties of a Merge. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface IMerge - */ - - /** - * Constructs a new Merge. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents a Merge. - * @implements IMerge - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge=} [properties] Properties to set - */ - function Merge(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 Merge instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge instance - */ - Merge.create = function create(properties) { - return new Merge(properties); - }; - - /** - * Encodes the specified Merge message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge} message Merge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Merge.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Merge message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge} message Merge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Merge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Merge message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Merge.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Merge message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Merge.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Merge message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Merge.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a Merge message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge - */ - Merge.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge) - return object; - return new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge(); - }; - - /** - * Creates a plain object from a Merge message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} message Merge - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Merge.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Merge to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @instance - * @returns {Object.} JSON object - */ - Merge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Merge - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Merge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.Merge"; - }; - - return Merge; - })(); - - return BigQueryDestinationConfig; - })(); - - v1.DestinationConfig = (function() { - - /** - * Properties of a DestinationConfig. - * @memberof google.cloud.datastream.v1 - * @interface IDestinationConfig - * @property {string|null} [destinationConnectionProfile] DestinationConfig destinationConnectionProfile - * @property {google.cloud.datastream.v1.IGcsDestinationConfig|null} [gcsDestinationConfig] DestinationConfig gcsDestinationConfig - * @property {google.cloud.datastream.v1.IBigQueryDestinationConfig|null} [bigqueryDestinationConfig] DestinationConfig bigqueryDestinationConfig - */ - - /** - * Constructs a new DestinationConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DestinationConfig. - * @implements IDestinationConfig - * @constructor - * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set - */ - function DestinationConfig(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]]; - } - - /** - * DestinationConfig destinationConnectionProfile. - * @member {string} destinationConnectionProfile - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.destinationConnectionProfile = ""; - - /** - * DestinationConfig gcsDestinationConfig. - * @member {google.cloud.datastream.v1.IGcsDestinationConfig|null|undefined} gcsDestinationConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.gcsDestinationConfig = null; - - /** - * DestinationConfig bigqueryDestinationConfig. - * @member {google.cloud.datastream.v1.IBigQueryDestinationConfig|null|undefined} bigqueryDestinationConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.bigqueryDestinationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DestinationConfig destinationStreamConfig. - * @member {"gcsDestinationConfig"|"bigqueryDestinationConfig"|undefined} destinationStreamConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - Object.defineProperty(DestinationConfig.prototype, "destinationStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestinationConfig", "bigqueryDestinationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig instance - */ - DestinationConfig.create = function create(properties) { - return new DestinationConfig(properties); - }; - - /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.destinationConnectionProfile != null && Object.hasOwnProperty.call(message, "destinationConnectionProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationConnectionProfile); - if (message.gcsDestinationConfig != null && Object.hasOwnProperty.call(message, "gcsDestinationConfig")) - $root.google.cloud.datastream.v1.GcsDestinationConfig.encode(message.gcsDestinationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.bigqueryDestinationConfig != null && Object.hasOwnProperty.call(message, "bigqueryDestinationConfig")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.encode(message.bigqueryDestinationConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.DestinationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.destinationConnectionProfile = reader.string(); - break; - } - case 100: { - message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.decode(reader, reader.uint32()); - break; - } - case 101: { - message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DestinationConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DestinationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) - if (!$util.isString(message.destinationConnectionProfile)) - return "destinationConnectionProfile: string expected"; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - properties.destinationStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.GcsDestinationConfig.verify(message.gcsDestinationConfig); - if (error) - return "gcsDestinationConfig." + error; - } - } - if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { - if (properties.destinationStreamConfig === 1) - return "destinationStreamConfig: multiple values"; - properties.destinationStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.verify(message.bigqueryDestinationConfig); - if (error) - return "bigqueryDestinationConfig." + error; - } - } - return null; - }; - - /** - * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig - */ - DestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DestinationConfig) - return object; - var message = new $root.google.cloud.datastream.v1.DestinationConfig(); - if (object.destinationConnectionProfile != null) - message.destinationConnectionProfile = String(object.destinationConnectionProfile); - if (object.gcsDestinationConfig != null) { - if (typeof object.gcsDestinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.DestinationConfig.gcsDestinationConfig: object expected"); - message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.fromObject(object.gcsDestinationConfig); - } - if (object.bigqueryDestinationConfig != null) { - if (typeof object.bigqueryDestinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.DestinationConfig.bigqueryDestinationConfig: object expected"); - message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.fromObject(object.bigqueryDestinationConfig); - } - return message; - }; - - /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1.DestinationConfig} message DestinationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.destinationConnectionProfile = ""; - if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) - object.destinationConnectionProfile = message.destinationConnectionProfile; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - object.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.toObject(message.gcsDestinationConfig, options); - if (options.oneofs) - object.destinationStreamConfig = "gcsDestinationConfig"; - } - if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { - object.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.toObject(message.bigqueryDestinationConfig, options); - if (options.oneofs) - object.destinationStreamConfig = "bigqueryDestinationConfig"; - } - return object; - }; - - /** - * Converts this DestinationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - * @returns {Object.} JSON object - */ - DestinationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DestinationConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.DestinationConfig"; - }; - - return DestinationConfig; - })(); - - v1.Stream = (function() { - - /** - * Properties of a Stream. - * @memberof google.cloud.datastream.v1 - * @interface IStream - * @property {string|null} [name] Stream name - * @property {google.protobuf.ITimestamp|null} [createTime] Stream createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Stream updateTime - * @property {Object.|null} [labels] Stream labels - * @property {string|null} [displayName] Stream displayName - * @property {google.cloud.datastream.v1.ISourceConfig|null} [sourceConfig] Stream sourceConfig - * @property {google.cloud.datastream.v1.IDestinationConfig|null} [destinationConfig] Stream destinationConfig - * @property {google.cloud.datastream.v1.Stream.State|null} [state] Stream state - * @property {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null} [backfillAll] Stream backfillAll - * @property {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null} [backfillNone] Stream backfillNone - * @property {Array.|null} [errors] Stream errors - * @property {string|null} [customerManagedEncryptionKey] Stream customerManagedEncryptionKey - * @property {google.protobuf.ITimestamp|null} [lastRecoveryTime] Stream lastRecoveryTime - */ - - /** - * Constructs a new Stream. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Stream. - * @implements IStream - * @constructor - * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set - */ - function Stream(properties) { - this.labels = {}; - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Stream name. - * @member {string} name - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.name = ""; - - /** - * Stream createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.createTime = null; - - /** - * Stream updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.updateTime = null; - - /** - * Stream labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.labels = $util.emptyObject; - - /** - * Stream displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.displayName = ""; - - /** - * Stream sourceConfig. - * @member {google.cloud.datastream.v1.ISourceConfig|null|undefined} sourceConfig - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.sourceConfig = null; - - /** - * Stream destinationConfig. - * @member {google.cloud.datastream.v1.IDestinationConfig|null|undefined} destinationConfig - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.destinationConfig = null; - - /** - * Stream state. - * @member {google.cloud.datastream.v1.Stream.State} state - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.state = 0; - - /** - * Stream backfillAll. - * @member {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null|undefined} backfillAll - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.backfillAll = null; - - /** - * Stream backfillNone. - * @member {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null|undefined} backfillNone - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.backfillNone = null; - - /** - * Stream errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.errors = $util.emptyArray; - - /** - * Stream customerManagedEncryptionKey. - * @member {string|null|undefined} customerManagedEncryptionKey - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.customerManagedEncryptionKey = null; - - /** - * Stream lastRecoveryTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastRecoveryTime - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Stream.prototype.lastRecoveryTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Stream backfillStrategy. - * @member {"backfillAll"|"backfillNone"|undefined} backfillStrategy - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Object.defineProperty(Stream.prototype, "backfillStrategy", { - get: $util.oneOfGetter($oneOfFields = ["backfillAll", "backfillNone"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Stream _customerManagedEncryptionKey. - * @member {"customerManagedEncryptionKey"|undefined} _customerManagedEncryptionKey - * @memberof google.cloud.datastream.v1.Stream - * @instance - */ - Object.defineProperty(Stream.prototype, "_customerManagedEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["customerManagedEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Stream instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream} Stream instance - */ - Stream.create = function create(properties) { - return new Stream(properties); - }; - - /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.sourceConfig != null && Object.hasOwnProperty.call(message, "sourceConfig")) - $root.google.cloud.datastream.v1.SourceConfig.encode(message.sourceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.destinationConfig != null && Object.hasOwnProperty.call(message, "destinationConfig")) - $root.google.cloud.datastream.v1.DestinationConfig.encode(message.destinationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.customerManagedEncryptionKey != null && Object.hasOwnProperty.call(message, "customerManagedEncryptionKey")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerManagedEncryptionKey); - if (message.lastRecoveryTime != null && Object.hasOwnProperty.call(message, "lastRecoveryTime")) - $root.google.protobuf.Timestamp.encode(message.lastRecoveryTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.backfillAll != null && Object.hasOwnProperty.call(message, "backfillAll")) - $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.encode(message.backfillAll, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.backfillNone != null && Object.hasOwnProperty.call(message, "backfillNone")) - $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.encode(message.backfillNone, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Stream(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 101: { - message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.decode(reader, reader.uint32()); - break; - } - case 102: { - message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); - break; - } - case 10: { - message.customerManagedEncryptionKey = reader.string(); - break; - } - case 13: { - message.lastRecoveryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Stream message. - * @function verify - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) { - var error = $root.google.cloud.datastream.v1.SourceConfig.verify(message.sourceConfig); - if (error) - return "sourceConfig." + error; - } - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) { - var error = $root.google.cloud.datastream.v1.DestinationConfig.verify(message.destinationConfig); - if (error) - return "destinationConfig." + 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: - case 7: - case 8: - break; - } - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify(message.backfillAll); - if (error) - return "backfillAll." + error; - } - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - if (properties.backfillStrategy === 1) - return "backfillStrategy: multiple values"; - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify(message.backfillNone); - if (error) - return "backfillNone." + error; - } - } - 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.datastream.v1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { - properties._customerManagedEncryptionKey = 1; - if (!$util.isString(message.customerManagedEncryptionKey)) - return "customerManagedEncryptionKey: string expected"; - } - if (message.lastRecoveryTime != null && message.hasOwnProperty("lastRecoveryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastRecoveryTime); - if (error) - return "lastRecoveryTime." + error; - } - return null; - }; - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream} Stream - */ - Stream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream) - return object; - var message = new $root.google.cloud.datastream.v1.Stream(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.sourceConfig != null) { - if (typeof object.sourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.sourceConfig: object expected"); - message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.fromObject(object.sourceConfig); - } - if (object.destinationConfig != null) { - if (typeof object.destinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.destinationConfig: object expected"); - message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.fromObject(object.destinationConfig); - } - 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 "NOT_STARTED": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "MAINTENANCE": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "FAILED_PERMANENTLY": - case 6: - message.state = 6; - break; - case "STARTING": - case 7: - message.state = 7; - break; - case "DRAINING": - case 8: - message.state = 8; - break; - } - if (object.backfillAll != null) { - if (typeof object.backfillAll !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.backfillAll: object expected"); - message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.fromObject(object.backfillAll); - } - if (object.backfillNone != null) { - if (typeof object.backfillNone !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.backfillNone: object expected"); - message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.fromObject(object.backfillNone); - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.Stream.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); - } - } - if (object.customerManagedEncryptionKey != null) - message.customerManagedEncryptionKey = String(object.customerManagedEncryptionKey); - if (object.lastRecoveryTime != null) { - if (typeof object.lastRecoveryTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.lastRecoveryTime: object expected"); - message.lastRecoveryTime = $root.google.protobuf.Timestamp.fromObject(object.lastRecoveryTime); - } - return message; - }; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {google.cloud.datastream.v1.Stream} message Stream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.sourceConfig = null; - object.destinationConfig = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.lastRecoveryTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) - object.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.toObject(message.sourceConfig, options); - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) - object.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.toObject(message.destinationConfig, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.Stream.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Stream.State[message.state] : message.state; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); - } - if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { - object.customerManagedEncryptionKey = message.customerManagedEncryptionKey; - if (options.oneofs) - object._customerManagedEncryptionKey = "customerManagedEncryptionKey"; - } - if (message.lastRecoveryTime != null && message.hasOwnProperty("lastRecoveryTime")) - object.lastRecoveryTime = $root.google.protobuf.Timestamp.toObject(message.lastRecoveryTime, options); - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - object.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.toObject(message.backfillAll, options); - if (options.oneofs) - object.backfillStrategy = "backfillAll"; - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - object.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.toObject(message.backfillNone, options); - if (options.oneofs) - object.backfillStrategy = "backfillNone"; - } - return object; - }; - - /** - * Converts this Stream to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Stream - * @instance - * @returns {Object.} JSON object - */ - Stream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Stream - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Stream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream"; - }; - - /** - * State enum. - * @name google.cloud.datastream.v1.Stream.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_STARTED=1 NOT_STARTED value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} MAINTENANCE=4 MAINTENANCE value - * @property {number} FAILED=5 FAILED value - * @property {number} FAILED_PERMANENTLY=6 FAILED_PERMANENTLY value - * @property {number} STARTING=7 STARTING value - * @property {number} DRAINING=8 DRAINING value - */ - Stream.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_STARTED"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "MAINTENANCE"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "FAILED_PERMANENTLY"] = 6; - values[valuesById[7] = "STARTING"] = 7; - values[valuesById[8] = "DRAINING"] = 8; - return values; - })(); - - Stream.BackfillAllStrategy = (function() { - - /** - * Properties of a BackfillAllStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @interface IBackfillAllStrategy - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleExcludedObjects] BackfillAllStrategy oracleExcludedObjects - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlExcludedObjects] BackfillAllStrategy mysqlExcludedObjects - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlExcludedObjects] BackfillAllStrategy postgresqlExcludedObjects - * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerExcludedObjects] BackfillAllStrategy sqlServerExcludedObjects - */ - - /** - * Constructs a new BackfillAllStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @classdesc Represents a BackfillAllStrategy. - * @implements IBackfillAllStrategy - * @constructor - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set - */ - function BackfillAllStrategy(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]]; - } - - /** - * BackfillAllStrategy oracleExcludedObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} oracleExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.oracleExcludedObjects = null; - - /** - * BackfillAllStrategy mysqlExcludedObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} mysqlExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.mysqlExcludedObjects = null; - - /** - * BackfillAllStrategy postgresqlExcludedObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} postgresqlExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.postgresqlExcludedObjects = null; - - /** - * BackfillAllStrategy sqlServerExcludedObjects. - * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.sqlServerExcludedObjects = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackfillAllStrategy excludedObjects. - * @member {"oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"|"sqlServerExcludedObjects"|undefined} excludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - Object.defineProperty(BackfillAllStrategy.prototype, "excludedObjects", { - get: $util.oneOfGetter($oneOfFields = ["oracleExcludedObjects", "mysqlExcludedObjects", "postgresqlExcludedObjects", "sqlServerExcludedObjects"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackfillAllStrategy instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy instance - */ - BackfillAllStrategy.create = function create(properties) { - return new BackfillAllStrategy(properties); - }; - - /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillAllStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleExcludedObjects != null && Object.hasOwnProperty.call(message, "oracleExcludedObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.oracleExcludedObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mysqlExcludedObjects != null && Object.hasOwnProperty.call(message, "mysqlExcludedObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlExcludedObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.postgresqlExcludedObjects != null && Object.hasOwnProperty.call(message, "postgresqlExcludedObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlExcludedObjects, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sqlServerExcludedObjects != null && Object.hasOwnProperty.call(message, "sqlServerExcludedObjects")) - $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerExcludedObjects, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillAllStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillAllStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillAllStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackfillAllStrategy message. - * @function verify - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackfillAllStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.oracleExcludedObjects); - if (error) - return "oracleExcludedObjects." + error; - } - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.mysqlExcludedObjects); - if (error) - return "mysqlExcludedObjects." + error; - } - } - if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.postgresqlExcludedObjects); - if (error) - return "postgresqlExcludedObjects." + error; - } - } - if (message.sqlServerExcludedObjects != null && message.hasOwnProperty("sqlServerExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerExcludedObjects); - if (error) - return "sqlServerExcludedObjects." + error; - } - } - return null; - }; - - /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy - */ - BackfillAllStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy) - return object; - var message = new $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy(); - if (object.oracleExcludedObjects != null) { - if (typeof object.oracleExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.oracleExcludedObjects: object expected"); - message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.oracleExcludedObjects); - } - if (object.mysqlExcludedObjects != null) { - if (typeof object.mysqlExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.mysqlExcludedObjects: object expected"); - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.mysqlExcludedObjects); - } - if (object.postgresqlExcludedObjects != null) { - if (typeof object.postgresqlExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.postgresqlExcludedObjects: object expected"); - message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlExcludedObjects); - } - if (object.sqlServerExcludedObjects != null) { - if (typeof object.sqlServerExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.sqlServerExcludedObjects: object expected"); - message.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerExcludedObjects); - } - return message; - }; - - /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.BackfillAllStrategy} message BackfillAllStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackfillAllStrategy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - object.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.oracleExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "oracleExcludedObjects"; - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - object.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.mysqlExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "mysqlExcludedObjects"; - } - if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { - object.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.postgresqlExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "postgresqlExcludedObjects"; - } - if (message.sqlServerExcludedObjects != null && message.hasOwnProperty("sqlServerExcludedObjects")) { - object.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "sqlServerExcludedObjects"; - } - return object; - }; - - /** - * Converts this BackfillAllStrategy to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - * @returns {Object.} JSON object - */ - BackfillAllStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackfillAllStrategy - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackfillAllStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillAllStrategy"; - }; - - return BackfillAllStrategy; - })(); - - Stream.BackfillNoneStrategy = (function() { - - /** - * Properties of a BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @interface IBackfillNoneStrategy - */ - - /** - * Constructs a new BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @classdesc Represents a BackfillNoneStrategy. - * @implements IBackfillNoneStrategy - * @constructor - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set - */ - function BackfillNoneStrategy(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 BackfillNoneStrategy instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy instance - */ - BackfillNoneStrategy.create = function create(properties) { - return new BackfillNoneStrategy(properties); - }; - - /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillNoneStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillNoneStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillNoneStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillNoneStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackfillNoneStrategy message. - * @function verify - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackfillNoneStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - */ - BackfillNoneStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) - return object; - return new $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(); - }; - - /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} message BackfillNoneStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackfillNoneStrategy.toObject = function toObject() { - return {}; - }; - - /** - * Converts this BackfillNoneStrategy to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @instance - * @returns {Object.} JSON object - */ - BackfillNoneStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackfillNoneStrategy - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackfillNoneStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillNoneStrategy"; - }; - - return BackfillNoneStrategy; - })(); - - return Stream; - })(); - - v1.StreamObject = (function() { - - /** - * Properties of a StreamObject. - * @memberof google.cloud.datastream.v1 - * @interface IStreamObject - * @property {string|null} [name] StreamObject name - * @property {google.protobuf.ITimestamp|null} [createTime] StreamObject createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] StreamObject updateTime - * @property {string|null} [displayName] StreamObject displayName - * @property {Array.|null} [errors] StreamObject errors - * @property {google.cloud.datastream.v1.IBackfillJob|null} [backfillJob] StreamObject backfillJob - * @property {google.cloud.datastream.v1.ISourceObjectIdentifier|null} [sourceObject] StreamObject sourceObject - */ - - /** - * Constructs a new StreamObject. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StreamObject. - * @implements IStreamObject - * @constructor - * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set - */ - function StreamObject(properties) { - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamObject name. - * @member {string} name - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.name = ""; - - /** - * StreamObject createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.createTime = null; - - /** - * StreamObject updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.updateTime = null; - - /** - * StreamObject displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.displayName = ""; - - /** - * StreamObject errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.errors = $util.emptyArray; - - /** - * StreamObject backfillJob. - * @member {google.cloud.datastream.v1.IBackfillJob|null|undefined} backfillJob - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.backfillJob = null; - - /** - * StreamObject sourceObject. - * @member {google.cloud.datastream.v1.ISourceObjectIdentifier|null|undefined} sourceObject - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.sourceObject = null; - - /** - * Creates a new StreamObject instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject instance - */ - StreamObject.create = function create(properties) { - return new StreamObject(properties); - }; - - /** - * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamObject.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backfillJob != null && Object.hasOwnProperty.call(message, "backfillJob")) - $root.google.cloud.datastream.v1.BackfillJob.encode(message.backfillJob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.sourceObject != null && Object.hasOwnProperty.call(message, "sourceObject")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.encode(message.sourceObject, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamObject message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamObject.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StreamObject(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); - break; - } - case 7: { - message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.decode(reader, reader.uint32()); - break; - } - case 8: { - message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamObject message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamObject.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamObject message. - * @function verify - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamObject.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.datastream.v1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) { - var error = $root.google.cloud.datastream.v1.BackfillJob.verify(message.backfillJob); - if (error) - return "backfillJob." + error; - } - if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.verify(message.sourceObject); - if (error) - return "sourceObject." + error; - } - return null; - }; - - /** - * Creates a StreamObject message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject - */ - StreamObject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StreamObject) - return object; - var message = new $root.google.cloud.datastream.v1.StreamObject(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); - } - } - if (object.backfillJob != null) { - if (typeof object.backfillJob !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.backfillJob: object expected"); - message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.fromObject(object.backfillJob); - } - if (object.sourceObject != null) { - if (typeof object.sourceObject !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.sourceObject: object expected"); - message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.fromObject(object.sourceObject); - } - return message; - }; - - /** - * Creates a plain object from a StreamObject message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {google.cloud.datastream.v1.StreamObject} message StreamObject - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamObject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.backfillJob = null; - object.sourceObject = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); - } - if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) - object.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.toObject(message.backfillJob, options); - if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) - object.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.toObject(message.sourceObject, options); - return object; - }; - - /** - * Converts this StreamObject to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - * @returns {Object.} JSON object - */ - StreamObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamObject - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StreamObject - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamObject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.StreamObject"; - }; - - return StreamObject; - })(); - - v1.SourceObjectIdentifier = (function() { - - /** - * Properties of a SourceObjectIdentifier. - * @memberof google.cloud.datastream.v1 - * @interface ISourceObjectIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null} [oracleIdentifier] SourceObjectIdentifier oracleIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null} [mysqlIdentifier] SourceObjectIdentifier mysqlIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null} [postgresqlIdentifier] SourceObjectIdentifier postgresqlIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null} [sqlServerIdentifier] SourceObjectIdentifier sqlServerIdentifier - */ - - /** - * Constructs a new SourceObjectIdentifier. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SourceObjectIdentifier. - * @implements ISourceObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set - */ - function SourceObjectIdentifier(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]]; - } - - /** - * SourceObjectIdentifier oracleIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null|undefined} oracleIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - */ - SourceObjectIdentifier.prototype.oracleIdentifier = null; - - /** - * SourceObjectIdentifier mysqlIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null|undefined} mysqlIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - */ - SourceObjectIdentifier.prototype.mysqlIdentifier = null; - - /** - * SourceObjectIdentifier postgresqlIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null|undefined} postgresqlIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - */ - SourceObjectIdentifier.prototype.postgresqlIdentifier = null; - - /** - * SourceObjectIdentifier sqlServerIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null|undefined} sqlServerIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - */ - SourceObjectIdentifier.prototype.sqlServerIdentifier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SourceObjectIdentifier sourceIdentifier. - * @member {"oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"|"sqlServerIdentifier"|undefined} sourceIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - */ - Object.defineProperty(SourceObjectIdentifier.prototype, "sourceIdentifier", { - get: $util.oneOfGetter($oneOfFields = ["oracleIdentifier", "mysqlIdentifier", "postgresqlIdentifier", "sqlServerIdentifier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SourceObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier instance - */ - SourceObjectIdentifier.create = function create(properties) { - return new SourceObjectIdentifier(properties); - }; - - /** - * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleIdentifier != null && Object.hasOwnProperty.call(message, "oracleIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.encode(message.oracleIdentifier, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mysqlIdentifier != null && Object.hasOwnProperty.call(message, "mysqlIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.encode(message.mysqlIdentifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.postgresqlIdentifier != null && Object.hasOwnProperty.call(message, "postgresqlIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.encode(message.postgresqlIdentifier, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sqlServerIdentifier != null && Object.hasOwnProperty.call(message, "sqlServerIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.encode(message.sqlServerIdentifier, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceObjectIdentifier.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.decode(reader, reader.uint32()); - break; - } - case 2: { - message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.decode(reader, reader.uint32()); - break; - } - case 3: { - message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify(message.oracleIdentifier); - if (error) - return "oracleIdentifier." + error; - } - } - if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { - if (properties.sourceIdentifier === 1) - return "sourceIdentifier: multiple values"; - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify(message.mysqlIdentifier); - if (error) - return "mysqlIdentifier." + error; - } - } - if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { - if (properties.sourceIdentifier === 1) - return "sourceIdentifier: multiple values"; - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify(message.postgresqlIdentifier); - if (error) - return "postgresqlIdentifier." + error; - } - } - if (message.sqlServerIdentifier != null && message.hasOwnProperty("sqlServerIdentifier")) { - if (properties.sourceIdentifier === 1) - return "sourceIdentifier: multiple values"; - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify(message.sqlServerIdentifier); - if (error) - return "sqlServerIdentifier." + error; - } - } - return null; - }; - - /** - * Creates a SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier - */ - SourceObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier(); - if (object.oracleIdentifier != null) { - if (typeof object.oracleIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.oracleIdentifier: object expected"); - message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.fromObject(object.oracleIdentifier); - } - if (object.mysqlIdentifier != null) { - if (typeof object.mysqlIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.mysqlIdentifier: object expected"); - message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.fromObject(object.mysqlIdentifier); - } - if (object.postgresqlIdentifier != null) { - if (typeof object.postgresqlIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.postgresqlIdentifier: object expected"); - message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.fromObject(object.postgresqlIdentifier); - } - if (object.sqlServerIdentifier != null) { - if (typeof object.sqlServerIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.sqlServerIdentifier: object expected"); - message.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.fromObject(object.sqlServerIdentifier); - } - return message; - }; - - /** - * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier} message SourceObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { - object.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.toObject(message.oracleIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "oracleIdentifier"; - } - if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { - object.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.toObject(message.mysqlIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "mysqlIdentifier"; - } - if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { - object.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.toObject(message.postgresqlIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "postgresqlIdentifier"; - } - if (message.sqlServerIdentifier != null && message.hasOwnProperty("sqlServerIdentifier")) { - object.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.toObject(message.sqlServerIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "sqlServerIdentifier"; - } - return object; - }; - - /** - * Converts this SourceObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - SourceObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier"; - }; - - SourceObjectIdentifier.OracleObjectIdentifier = (function() { - - /** - * Properties of an OracleObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IOracleObjectIdentifier - * @property {string|null} [schema] OracleObjectIdentifier schema - * @property {string|null} [table] OracleObjectIdentifier table - */ - - /** - * Constructs a new OracleObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents an OracleObjectIdentifier. - * @implements IOracleObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set - */ - function OracleObjectIdentifier(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]]; - } - - /** - * OracleObjectIdentifier schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - */ - OracleObjectIdentifier.prototype.schema = ""; - - /** - * OracleObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - */ - OracleObjectIdentifier.prototype.table = ""; - - /** - * Creates a new OracleObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier instance - */ - OracleObjectIdentifier.create = function create(properties) { - return new OracleObjectIdentifier(properties); - }; - - /** - * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; - - /** - * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleObjectIdentifier.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; - - /** - * Creates an OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - */ - OracleObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.table != null) - message.table = String(object.table); - return message; - }; - - /** - * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} message OracleObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schema = ""; - object.table = ""; - } - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; - - /** - * Converts this OracleObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - OracleObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier"; - }; - - return OracleObjectIdentifier; - })(); - - SourceObjectIdentifier.PostgresqlObjectIdentifier = (function() { - - /** - * Properties of a PostgresqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IPostgresqlObjectIdentifier - * @property {string|null} [schema] PostgresqlObjectIdentifier schema - * @property {string|null} [table] PostgresqlObjectIdentifier table - */ - - /** - * Constructs a new PostgresqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents a PostgresqlObjectIdentifier. - * @implements IPostgresqlObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set - */ - function PostgresqlObjectIdentifier(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]]; - } - - /** - * PostgresqlObjectIdentifier schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - */ - PostgresqlObjectIdentifier.prototype.schema = ""; - - /** - * PostgresqlObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - */ - PostgresqlObjectIdentifier.prototype.table = ""; - - /** - * Creates a new PostgresqlObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier instance - */ - PostgresqlObjectIdentifier.create = function create(properties) { - return new PostgresqlObjectIdentifier(properties); - }; - - /** - * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; - - /** - * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlObjectIdentifier.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; - - /** - * Creates a PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - */ - PostgresqlObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.table != null) - message.table = String(object.table); - return message; - }; - - /** - * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} message PostgresqlObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schema = ""; - object.table = ""; - } - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; - - /** - * Converts this PostgresqlObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - PostgresqlObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier"; - }; - - return PostgresqlObjectIdentifier; - })(); - - SourceObjectIdentifier.MysqlObjectIdentifier = (function() { - - /** - * Properties of a MysqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IMysqlObjectIdentifier - * @property {string|null} [database] MysqlObjectIdentifier database - * @property {string|null} [table] MysqlObjectIdentifier table - */ - - /** - * Constructs a new MysqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents a MysqlObjectIdentifier. - * @implements IMysqlObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set - */ - function MysqlObjectIdentifier(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]]; - } - - /** - * MysqlObjectIdentifier database. - * @member {string} database - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - */ - MysqlObjectIdentifier.prototype.database = ""; - - /** - * MysqlObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - */ - MysqlObjectIdentifier.prototype.table = ""; - - /** - * Creates a new MysqlObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier instance - */ - MysqlObjectIdentifier.create = function create(properties) { - return new MysqlObjectIdentifier(properties); - }; - - /** - * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlObjectIdentifier.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.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; - - /** - * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlObjectIdentifier.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.database = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlObjectIdentifier.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.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; - - /** - * Creates a MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - */ - MysqlObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); - if (object.database != null) - message.database = String(object.database); - if (object.table != null) - message.table = String(object.table); - return message; - }; - - /** - * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} message MysqlObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.database = ""; - object.table = ""; - } - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; - - /** - * Converts this MysqlObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - MysqlObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier"; - }; - - return MysqlObjectIdentifier; - })(); - - SourceObjectIdentifier.SqlServerObjectIdentifier = (function() { - - /** - * Properties of a SqlServerObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface ISqlServerObjectIdentifier - * @property {string|null} [schema] SqlServerObjectIdentifier schema - * @property {string|null} [table] SqlServerObjectIdentifier table - */ - - /** - * Constructs a new SqlServerObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents a SqlServerObjectIdentifier. - * @implements ISqlServerObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier=} [properties] Properties to set - */ - function SqlServerObjectIdentifier(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]]; - } - - /** - * SqlServerObjectIdentifier schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @instance - */ - SqlServerObjectIdentifier.prototype.schema = ""; - - /** - * SqlServerObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @instance - */ - SqlServerObjectIdentifier.prototype.table = ""; - - /** - * Creates a new SqlServerObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier instance - */ - SqlServerObjectIdentifier.create = function create(properties) { - return new SqlServerObjectIdentifier(properties); - }; - - /** - * Encodes the specified SqlServerObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier} message SqlServerObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; - - /** - * Encodes the specified SqlServerObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier} message SqlServerObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerObjectIdentifier.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; - - /** - * Creates a SqlServerObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier - */ - SqlServerObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.table != null) - message.table = String(object.table); - return message; - }; - - /** - * Creates a plain object from a SqlServerObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} message SqlServerObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schema = ""; - object.table = ""; - } - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; - - /** - * Converts this SqlServerObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - SqlServerObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier"; - }; - - return SqlServerObjectIdentifier; - })(); - - return SourceObjectIdentifier; - })(); - - v1.BackfillJob = (function() { - - /** - * Properties of a BackfillJob. - * @memberof google.cloud.datastream.v1 - * @interface IBackfillJob - * @property {google.cloud.datastream.v1.BackfillJob.State|null} [state] BackfillJob state - * @property {google.cloud.datastream.v1.BackfillJob.Trigger|null} [trigger] BackfillJob trigger - * @property {google.protobuf.ITimestamp|null} [lastStartTime] BackfillJob lastStartTime - * @property {google.protobuf.ITimestamp|null} [lastEndTime] BackfillJob lastEndTime - * @property {Array.|null} [errors] BackfillJob errors - */ - - /** - * Constructs a new BackfillJob. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BackfillJob. - * @implements IBackfillJob - * @constructor - * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set - */ - function BackfillJob(properties) { - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackfillJob state. - * @member {google.cloud.datastream.v1.BackfillJob.State} state - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.state = 0; - - /** - * BackfillJob trigger. - * @member {google.cloud.datastream.v1.BackfillJob.Trigger} trigger - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.trigger = 0; - - /** - * BackfillJob lastStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastStartTime - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.lastStartTime = null; - - /** - * BackfillJob lastEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastEndTime - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.lastEndTime = null; - - /** - * BackfillJob errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.errors = $util.emptyArray; - - /** - * Creates a new BackfillJob instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob instance - */ - BackfillJob.create = function create(properties) { - return new BackfillJob(properties); - }; - - /** - * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillJob.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); - if (message.lastStartTime != null && Object.hasOwnProperty.call(message, "lastStartTime")) - $root.google.protobuf.Timestamp.encode(message.lastStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastEndTime != null && Object.hasOwnProperty.call(message, "lastEndTime")) - $root.google.protobuf.Timestamp.encode(message.lastEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillJob.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackfillJob message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillJob.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BackfillJob(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.trigger = reader.int32(); - break; - } - case 3: { - message.lastStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.lastEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackfillJob message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillJob.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackfillJob message. - * @function verify - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackfillJob.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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: - case 7: - break; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lastStartTime != null && message.hasOwnProperty("lastStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastStartTime); - if (error) - return "lastStartTime." + error; - } - if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastEndTime); - if (error) - return "lastEndTime." + error; - } - 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.datastream.v1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates a BackfillJob message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob - */ - BackfillJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BackfillJob) - return object; - var message = new $root.google.cloud.datastream.v1.BackfillJob(); - 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 "NOT_STARTED": - case 1: - message.state = 1; - break; - case "PENDING": - case 2: - message.state = 2; - break; - case "ACTIVE": - case 3: - message.state = 3; - break; - case "STOPPED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "COMPLETED": - case 6: - message.state = 6; - break; - case "UNSUPPORTED": - case 7: - message.state = 7; - break; - } - switch (object.trigger) { - default: - if (typeof object.trigger === "number") { - message.trigger = object.trigger; - break; - } - break; - case "TRIGGER_UNSPECIFIED": - case 0: - message.trigger = 0; - break; - case "AUTOMATIC": - case 1: - message.trigger = 1; - break; - case "MANUAL": - case 2: - message.trigger = 2; - break; - } - if (object.lastStartTime != null) { - if (typeof object.lastStartTime !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastStartTime: object expected"); - message.lastStartTime = $root.google.protobuf.Timestamp.fromObject(object.lastStartTime); - } - if (object.lastEndTime != null) { - if (typeof object.lastEndTime !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastEndTime: object expected"); - message.lastEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastEndTime); - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {google.cloud.datastream.v1.BackfillJob} message BackfillJob - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackfillJob.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.lastStartTime = null; - object.lastEndTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.BackfillJob.State[message.state] : message.state; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] : message.trigger; - if (message.lastStartTime != null && message.hasOwnProperty("lastStartTime")) - object.lastStartTime = $root.google.protobuf.Timestamp.toObject(message.lastStartTime, options); - if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) - object.lastEndTime = $root.google.protobuf.Timestamp.toObject(message.lastEndTime, options); - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this BackfillJob to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - * @returns {Object.} JSON object - */ - BackfillJob.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackfillJob - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BackfillJob - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackfillJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BackfillJob"; - }; - - /** - * State enum. - * @name google.cloud.datastream.v1.BackfillJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_STARTED=1 NOT_STARTED value - * @property {number} PENDING=2 PENDING value - * @property {number} ACTIVE=3 ACTIVE value - * @property {number} STOPPED=4 STOPPED value - * @property {number} FAILED=5 FAILED value - * @property {number} COMPLETED=6 COMPLETED value - * @property {number} UNSUPPORTED=7 UNSUPPORTED value - */ - BackfillJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_STARTED"] = 1; - values[valuesById[2] = "PENDING"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - values[valuesById[4] = "STOPPED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "COMPLETED"] = 6; - values[valuesById[7] = "UNSUPPORTED"] = 7; - return values; - })(); - - /** - * Trigger enum. - * @name google.cloud.datastream.v1.BackfillJob.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} AUTOMATIC=1 AUTOMATIC value - * @property {number} MANUAL=2 MANUAL value - */ - BackfillJob.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTOMATIC"] = 1; - values[valuesById[2] = "MANUAL"] = 2; - return values; - })(); - - return BackfillJob; - })(); - - v1.Error = (function() { - - /** - * Properties of an Error. - * @memberof google.cloud.datastream.v1 - * @interface IError - * @property {string|null} [reason] Error reason - * @property {string|null} [errorUuid] Error errorUuid - * @property {string|null} [message] Error message - * @property {google.protobuf.ITimestamp|null} [errorTime] Error errorTime - * @property {Object.|null} [details] Error details - */ - - /** - * Constructs a new Error. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an Error. - * @implements IError - * @constructor - * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set - */ - function Error(properties) { - this.details = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Error reason. - * @member {string} reason - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.reason = ""; - - /** - * Error errorUuid. - * @member {string} errorUuid - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.errorUuid = ""; - - /** - * Error message. - * @member {string} message - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.message = ""; - - /** - * Error errorTime. - * @member {google.protobuf.ITimestamp|null|undefined} errorTime - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.errorTime = null; - - /** - * Error details. - * @member {Object.} details - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.details = $util.emptyObject; - - /** - * Creates a new Error instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Error} Error instance - */ - Error.create = function create(properties) { - return new Error(properties); - }; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.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.errorUuid != null && Object.hasOwnProperty.call(message, "errorUuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorUuid); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); - if (message.errorTime != null && Object.hasOwnProperty.call(message, "errorTime")) - $root.google.protobuf.Timestamp.encode(message.errorTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - for (var keys = Object.keys(message.details), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.details[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Error message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Error(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.reason = reader.string(); - break; - } - case 2: { - message.errorUuid = reader.string(); - break; - } - case 3: { - message.message = reader.string(); - break; - } - case 4: { - message.errorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.details === $util.emptyObject) - message.details = {}; - 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.details[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Error message. - * @function verify - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Error.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.errorUuid != null && message.hasOwnProperty("errorUuid")) - if (!$util.isString(message.errorUuid)) - return "errorUuid: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.errorTime); - if (error) - return "errorTime." + error; - } - if (message.details != null && message.hasOwnProperty("details")) { - if (!$util.isObject(message.details)) - return "details: object expected"; - var key = Object.keys(message.details); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.details[key[i]])) - return "details: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Error} Error - */ - Error.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Error) - return object; - var message = new $root.google.cloud.datastream.v1.Error(); - if (object.reason != null) - message.reason = String(object.reason); - if (object.errorUuid != null) - message.errorUuid = String(object.errorUuid); - if (object.message != null) - message.message = String(object.message); - if (object.errorTime != null) { - if (typeof object.errorTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Error.errorTime: object expected"); - message.errorTime = $root.google.protobuf.Timestamp.fromObject(object.errorTime); - } - if (object.details) { - if (typeof object.details !== "object") - throw TypeError(".google.cloud.datastream.v1.Error.details: object expected"); - message.details = {}; - for (var keys = Object.keys(object.details), i = 0; i < keys.length; ++i) - message.details[keys[i]] = String(object.details[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.Error} message Error - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Error.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.details = {}; - if (options.defaults) { - object.reason = ""; - object.errorUuid = ""; - object.message = ""; - object.errorTime = null; - } - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) - object.errorUuid = message.errorUuid; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) - object.errorTime = $root.google.protobuf.Timestamp.toObject(message.errorTime, options); - var keys2; - if (message.details && (keys2 = Object.keys(message.details)).length) { - object.details = {}; - for (var j = 0; j < keys2.length; ++j) - object.details[keys2[j]] = message.details[keys2[j]]; - } - return object; - }; - - /** - * Converts this Error to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Error - * @instance - * @returns {Object.} JSON object - */ - Error.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Error - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Error"; - }; - - return Error; - })(); - - v1.ValidationResult = (function() { - - /** - * Properties of a ValidationResult. - * @memberof google.cloud.datastream.v1 - * @interface IValidationResult - * @property {Array.|null} [validations] ValidationResult validations - */ - - /** - * Constructs a new ValidationResult. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ValidationResult. - * @implements IValidationResult - * @constructor - * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set - */ - function ValidationResult(properties) { - this.validations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidationResult validations. - * @member {Array.} validations - * @memberof google.cloud.datastream.v1.ValidationResult - * @instance - */ - ValidationResult.prototype.validations = $util.emptyArray; - - /** - * Creates a new ValidationResult instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult instance - */ - ValidationResult.create = function create(properties) { - return new ValidationResult(properties); - }; - - /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validations != null && message.validations.length) - for (var i = 0; i < message.validations.length; ++i) - $root.google.cloud.datastream.v1.Validation.encode(message.validations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidationResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ValidationResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.validations && message.validations.length)) - message.validations = []; - message.validations.push($root.google.cloud.datastream.v1.Validation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidationResult message. - * @function verify - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validations != null && message.hasOwnProperty("validations")) { - if (!Array.isArray(message.validations)) - return "validations: array expected"; - for (var i = 0; i < message.validations.length; ++i) { - var error = $root.google.cloud.datastream.v1.Validation.verify(message.validations[i]); - if (error) - return "validations." + error; - } - } - return null; - }; - - /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult - */ - ValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ValidationResult) - return object; - var message = new $root.google.cloud.datastream.v1.ValidationResult(); - if (object.validations) { - if (!Array.isArray(object.validations)) - throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: array expected"); - message.validations = []; - for (var i = 0; i < object.validations.length; ++i) { - if (typeof object.validations[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: object expected"); - message.validations[i] = $root.google.cloud.datastream.v1.Validation.fromObject(object.validations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {google.cloud.datastream.v1.ValidationResult} message ValidationResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validations = []; - if (message.validations && message.validations.length) { - object.validations = []; - for (var j = 0; j < message.validations.length; ++j) - object.validations[j] = $root.google.cloud.datastream.v1.Validation.toObject(message.validations[j], options); - } - return object; - }; - - /** - * Converts this ValidationResult to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ValidationResult - * @instance - * @returns {Object.} JSON object - */ - ValidationResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidationResult - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ValidationResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationResult"; - }; - - return ValidationResult; - })(); - - v1.Validation = (function() { - - /** - * Properties of a Validation. - * @memberof google.cloud.datastream.v1 - * @interface IValidation - * @property {string|null} [description] Validation description - * @property {google.cloud.datastream.v1.Validation.State|null} [state] Validation state - * @property {Array.|null} [message] Validation message - * @property {string|null} [code] Validation code - */ - - /** - * Constructs a new Validation. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Validation. - * @implements IValidation - * @constructor - * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set - */ - function Validation(properties) { - this.message = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Validation description. - * @member {string} description - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.description = ""; - - /** - * Validation state. - * @member {google.cloud.datastream.v1.Validation.State} state - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.state = 0; - - /** - * Validation message. - * @member {Array.} message - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.message = $util.emptyArray; - - /** - * Validation code. - * @member {string} code - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.code = ""; - - /** - * Creates a new Validation instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Validation} Validation instance - */ - Validation.create = function create(properties) { - return new Validation(properties); - }; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.message != null && message.message.length) - for (var i = 0; i < message.message.length; ++i) - $root.google.cloud.datastream.v1.ValidationMessage.encode(message.message[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); - return writer; - }; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Validation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - if (!(message.message && message.message.length)) - message.message = []; - message.message.push($root.google.cloud.datastream.v1.ValidationMessage.decode(reader, reader.uint32())); - break; - } - case 4: { - message.code = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Validation message. - * @function verify - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Validation.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.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.message != null && message.hasOwnProperty("message")) { - if (!Array.isArray(message.message)) - return "message: array expected"; - for (var i = 0; i < message.message.length; ++i) { - var error = $root.google.cloud.datastream.v1.ValidationMessage.verify(message.message[i]); - if (error) - return "message." + error; - } - } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; - return null; - }; - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Validation} Validation - */ - Validation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Validation) - return object; - var message = new $root.google.cloud.datastream.v1.Validation(); - if (object.description != null) - message.description = String(object.description); - 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 "NOT_EXECUTED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "PASSED": - case 3: - message.state = 3; - break; - case "WARNING": - case 4: - message.state = 4; - break; - } - if (object.message) { - if (!Array.isArray(object.message)) - throw TypeError(".google.cloud.datastream.v1.Validation.message: array expected"); - message.message = []; - for (var i = 0; i < object.message.length; ++i) { - if (typeof object.message[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.Validation.message: object expected"); - message.message[i] = $root.google.cloud.datastream.v1.ValidationMessage.fromObject(object.message[i]); - } - } - if (object.code != null) - message.code = String(object.code); - return message; - }; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {google.cloud.datastream.v1.Validation} message Validation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.message = []; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.Validation.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Validation.State[message.state] : message.state; - if (message.message && message.message.length) { - object.message = []; - for (var j = 0; j < message.message.length; ++j) - object.message[j] = $root.google.cloud.datastream.v1.ValidationMessage.toObject(message.message[j], options); - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - return object; - }; - - /** - * Converts this Validation to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Validation - * @instance - * @returns {Object.} JSON object - */ - Validation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Validation - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Validation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Validation"; - }; - - /** - * State enum. - * @name google.cloud.datastream.v1.Validation.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_EXECUTED=1 NOT_EXECUTED value - * @property {number} FAILED=2 FAILED value - * @property {number} PASSED=3 PASSED value - * @property {number} WARNING=4 WARNING value - */ - Validation.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_EXECUTED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "PASSED"] = 3; - values[valuesById[4] = "WARNING"] = 4; - return values; - })(); - - return Validation; - })(); - - v1.ValidationMessage = (function() { - - /** - * Properties of a ValidationMessage. - * @memberof google.cloud.datastream.v1 - * @interface IValidationMessage - * @property {string|null} [message] ValidationMessage message - * @property {google.cloud.datastream.v1.ValidationMessage.Level|null} [level] ValidationMessage level - * @property {Object.|null} [metadata] ValidationMessage metadata - * @property {string|null} [code] ValidationMessage code - */ - - /** - * Constructs a new ValidationMessage. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage - * @constructor - * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set - */ - function ValidationMessage(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]]; - } - - /** - * ValidationMessage message. - * @member {string} message - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.message = ""; - - /** - * ValidationMessage level. - * @member {google.cloud.datastream.v1.ValidationMessage.Level} level - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.level = 0; - - /** - * ValidationMessage metadata. - * @member {Object.} metadata - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.metadata = $util.emptyObject; - - /** - * ValidationMessage code. - * @member {string} code - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.code = ""; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage instance - */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); - }; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.level != null && Object.hasOwnProperty.call(message, "level")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); - 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(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); - return writer; - }; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ValidationMessage(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.level = reader.int32(); - 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; - } - case 4: { - message.code = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidationMessage message. - * @function verify - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.level != null && message.hasOwnProperty("level")) - switch (message.level) { - default: - return "level: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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"; - } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; - return null; - }; - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage - */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ValidationMessage) - return object; - var message = new $root.google.cloud.datastream.v1.ValidationMessage(); - if (object.message != null) - message.message = String(object.message); - switch (object.level) { - default: - if (typeof object.level === "number") { - message.level = object.level; - break; - } - break; - case "LEVEL_UNSPECIFIED": - case 0: - message.level = 0; - break; - case "WARNING": - case 1: - message.level = 1; - break; - case "ERROR": - case 2: - message.level = 2; - break; - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.datastream.v1.ValidationMessage.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]]); - } - if (object.code != null) - message.code = String(object.code); - return message; - }; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1.ValidationMessage} message ValidationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.message = ""; - object.level = options.enums === String ? "LEVEL_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.level != null && message.hasOwnProperty("level")) - object.level = options.enums === String ? $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] === undefined ? message.level : $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] : message.level; - 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]]; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - return object; - }; - - /** - * Converts this ValidationMessage to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - * @returns {Object.} JSON object - */ - ValidationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidationMessage - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ValidationMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationMessage"; - }; - - /** - * Level enum. - * @name google.cloud.datastream.v1.ValidationMessage.Level - * @enum {number} - * @property {number} LEVEL_UNSPECIFIED=0 LEVEL_UNSPECIFIED value - * @property {number} WARNING=1 WARNING value - * @property {number} ERROR=2 ERROR value - */ - ValidationMessage.Level = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "WARNING"] = 1; - values[valuesById[2] = "ERROR"] = 2; - return values; - })(); - - return ValidationMessage; - })(); - - v1.CdcStrategy = (function() { - - /** - * Properties of a CdcStrategy. - * @memberof google.cloud.datastream.v1 - * @interface ICdcStrategy - * @property {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null} [mostRecentStartPosition] CdcStrategy mostRecentStartPosition - * @property {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null} [nextAvailableStartPosition] CdcStrategy nextAvailableStartPosition - * @property {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null} [specificStartPosition] CdcStrategy specificStartPosition - */ - - /** - * Constructs a new CdcStrategy. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a CdcStrategy. - * @implements ICdcStrategy - * @constructor - * @param {google.cloud.datastream.v1.ICdcStrategy=} [properties] Properties to set - */ - function CdcStrategy(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]]; - } - - /** - * CdcStrategy mostRecentStartPosition. - * @member {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null|undefined} mostRecentStartPosition - * @memberof google.cloud.datastream.v1.CdcStrategy - * @instance - */ - CdcStrategy.prototype.mostRecentStartPosition = null; - - /** - * CdcStrategy nextAvailableStartPosition. - * @member {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null|undefined} nextAvailableStartPosition - * @memberof google.cloud.datastream.v1.CdcStrategy - * @instance - */ - CdcStrategy.prototype.nextAvailableStartPosition = null; - - /** - * CdcStrategy specificStartPosition. - * @member {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null|undefined} specificStartPosition - * @memberof google.cloud.datastream.v1.CdcStrategy - * @instance - */ - CdcStrategy.prototype.specificStartPosition = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CdcStrategy startPosition. - * @member {"mostRecentStartPosition"|"nextAvailableStartPosition"|"specificStartPosition"|undefined} startPosition - * @memberof google.cloud.datastream.v1.CdcStrategy - * @instance - */ - Object.defineProperty(CdcStrategy.prototype, "startPosition", { - get: $util.oneOfGetter($oneOfFields = ["mostRecentStartPosition", "nextAvailableStartPosition", "specificStartPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CdcStrategy instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {google.cloud.datastream.v1.ICdcStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy instance - */ - CdcStrategy.create = function create(properties) { - return new CdcStrategy(properties); - }; - - /** - * Encodes the specified CdcStrategy message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {google.cloud.datastream.v1.ICdcStrategy} message CdcStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CdcStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mostRecentStartPosition != null && Object.hasOwnProperty.call(message, "mostRecentStartPosition")) - $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.encode(message.mostRecentStartPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.nextAvailableStartPosition != null && Object.hasOwnProperty.call(message, "nextAvailableStartPosition")) - $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.encode(message.nextAvailableStartPosition, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.specificStartPosition != null && Object.hasOwnProperty.call(message, "specificStartPosition")) - $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.encode(message.specificStartPosition, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CdcStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {google.cloud.datastream.v1.ICdcStrategy} message CdcStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CdcStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CdcStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CdcStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CdcStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 101: { - message.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.decode(reader, reader.uint32()); - break; - } - case 102: { - message.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.decode(reader, reader.uint32()); - break; - } - case 103: { - message.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CdcStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CdcStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CdcStrategy message. - * @function verify - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CdcStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mostRecentStartPosition != null && message.hasOwnProperty("mostRecentStartPosition")) { - properties.startPosition = 1; - { - var error = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify(message.mostRecentStartPosition); - if (error) - return "mostRecentStartPosition." + error; - } - } - if (message.nextAvailableStartPosition != null && message.hasOwnProperty("nextAvailableStartPosition")) { - if (properties.startPosition === 1) - return "startPosition: multiple values"; - properties.startPosition = 1; - { - var error = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify(message.nextAvailableStartPosition); - if (error) - return "nextAvailableStartPosition." + error; - } - } - if (message.specificStartPosition != null && message.hasOwnProperty("specificStartPosition")) { - if (properties.startPosition === 1) - return "startPosition: multiple values"; - properties.startPosition = 1; - { - var error = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify(message.specificStartPosition); - if (error) - return "specificStartPosition." + error; - } - } - return null; - }; - - /** - * Creates a CdcStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy - */ - CdcStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy) - return object; - var message = new $root.google.cloud.datastream.v1.CdcStrategy(); - if (object.mostRecentStartPosition != null) { - if (typeof object.mostRecentStartPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.mostRecentStartPosition: object expected"); - message.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.fromObject(object.mostRecentStartPosition); - } - if (object.nextAvailableStartPosition != null) { - if (typeof object.nextAvailableStartPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.nextAvailableStartPosition: object expected"); - message.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.fromObject(object.nextAvailableStartPosition); - } - if (object.specificStartPosition != null) { - if (typeof object.specificStartPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.specificStartPosition: object expected"); - message.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.fromObject(object.specificStartPosition); - } - return message; - }; - - /** - * Creates a plain object from a CdcStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {google.cloud.datastream.v1.CdcStrategy} message CdcStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CdcStrategy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.mostRecentStartPosition != null && message.hasOwnProperty("mostRecentStartPosition")) { - object.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.toObject(message.mostRecentStartPosition, options); - if (options.oneofs) - object.startPosition = "mostRecentStartPosition"; - } - if (message.nextAvailableStartPosition != null && message.hasOwnProperty("nextAvailableStartPosition")) { - object.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.toObject(message.nextAvailableStartPosition, options); - if (options.oneofs) - object.startPosition = "nextAvailableStartPosition"; - } - if (message.specificStartPosition != null && message.hasOwnProperty("specificStartPosition")) { - object.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.toObject(message.specificStartPosition, options); - if (options.oneofs) - object.startPosition = "specificStartPosition"; - } - return object; - }; - - /** - * Converts this CdcStrategy to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CdcStrategy - * @instance - * @returns {Object.} JSON object - */ - CdcStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CdcStrategy - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CdcStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CdcStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy"; - }; - - CdcStrategy.MostRecentStartPosition = (function() { - - /** - * Properties of a MostRecentStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @interface IMostRecentStartPosition - */ - - /** - * Constructs a new MostRecentStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @classdesc Represents a MostRecentStartPosition. - * @implements IMostRecentStartPosition - * @constructor - * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition=} [properties] Properties to set - */ - function MostRecentStartPosition(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 MostRecentStartPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition instance - */ - MostRecentStartPosition.create = function create(properties) { - return new MostRecentStartPosition(properties); - }; - - /** - * Encodes the specified MostRecentStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition} message MostRecentStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MostRecentStartPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MostRecentStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition} message MostRecentStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MostRecentStartPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MostRecentStartPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MostRecentStartPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MostRecentStartPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MostRecentStartPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MostRecentStartPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MostRecentStartPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MostRecentStartPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition - */ - MostRecentStartPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition) - return object; - return new $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition(); - }; - - /** - * Creates a plain object from a MostRecentStartPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} message MostRecentStartPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MostRecentStartPosition.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MostRecentStartPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @instance - * @returns {Object.} JSON object - */ - MostRecentStartPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MostRecentStartPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MostRecentStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition"; - }; - - return MostRecentStartPosition; - })(); - - CdcStrategy.NextAvailableStartPosition = (function() { - - /** - * Properties of a NextAvailableStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @interface INextAvailableStartPosition - */ - - /** - * Constructs a new NextAvailableStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @classdesc Represents a NextAvailableStartPosition. - * @implements INextAvailableStartPosition - * @constructor - * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition=} [properties] Properties to set - */ - function NextAvailableStartPosition(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 NextAvailableStartPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition instance - */ - NextAvailableStartPosition.create = function create(properties) { - return new NextAvailableStartPosition(properties); - }; - - /** - * Encodes the specified NextAvailableStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition} message NextAvailableStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextAvailableStartPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified NextAvailableStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition} message NextAvailableStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextAvailableStartPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NextAvailableStartPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextAvailableStartPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NextAvailableStartPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextAvailableStartPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NextAvailableStartPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NextAvailableStartPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a NextAvailableStartPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition - */ - NextAvailableStartPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition) - return object; - return new $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition(); - }; - - /** - * Creates a plain object from a NextAvailableStartPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} message NextAvailableStartPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NextAvailableStartPosition.toObject = function toObject() { - return {}; - }; - - /** - * Converts this NextAvailableStartPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @instance - * @returns {Object.} JSON object - */ - NextAvailableStartPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NextAvailableStartPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NextAvailableStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition"; - }; - - return NextAvailableStartPosition; - })(); - - CdcStrategy.SpecificStartPosition = (function() { - - /** - * Properties of a SpecificStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @interface ISpecificStartPosition - * @property {google.cloud.datastream.v1.IMysqlLogPosition|null} [mysqlLogPosition] SpecificStartPosition mysqlLogPosition - * @property {google.cloud.datastream.v1.IOracleScnPosition|null} [oracleScnPosition] SpecificStartPosition oracleScnPosition - * @property {google.cloud.datastream.v1.ISqlServerLsnPosition|null} [sqlServerLsnPosition] SpecificStartPosition sqlServerLsnPosition - */ - - /** - * Constructs a new SpecificStartPosition. - * @memberof google.cloud.datastream.v1.CdcStrategy - * @classdesc Represents a SpecificStartPosition. - * @implements ISpecificStartPosition - * @constructor - * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition=} [properties] Properties to set - */ - function SpecificStartPosition(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]]; - } - - /** - * SpecificStartPosition mysqlLogPosition. - * @member {google.cloud.datastream.v1.IMysqlLogPosition|null|undefined} mysqlLogPosition - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @instance - */ - SpecificStartPosition.prototype.mysqlLogPosition = null; - - /** - * SpecificStartPosition oracleScnPosition. - * @member {google.cloud.datastream.v1.IOracleScnPosition|null|undefined} oracleScnPosition - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @instance - */ - SpecificStartPosition.prototype.oracleScnPosition = null; - - /** - * SpecificStartPosition sqlServerLsnPosition. - * @member {google.cloud.datastream.v1.ISqlServerLsnPosition|null|undefined} sqlServerLsnPosition - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @instance - */ - SpecificStartPosition.prototype.sqlServerLsnPosition = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SpecificStartPosition position. - * @member {"mysqlLogPosition"|"oracleScnPosition"|"sqlServerLsnPosition"|undefined} position - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @instance - */ - Object.defineProperty(SpecificStartPosition.prototype, "position", { - get: $util.oneOfGetter($oneOfFields = ["mysqlLogPosition", "oracleScnPosition", "sqlServerLsnPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SpecificStartPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition instance - */ - SpecificStartPosition.create = function create(properties) { - return new SpecificStartPosition(properties); - }; - - /** - * Encodes the specified SpecificStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition} message SpecificStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecificStartPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mysqlLogPosition != null && Object.hasOwnProperty.call(message, "mysqlLogPosition")) - $root.google.cloud.datastream.v1.MysqlLogPosition.encode(message.mysqlLogPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.oracleScnPosition != null && Object.hasOwnProperty.call(message, "oracleScnPosition")) - $root.google.cloud.datastream.v1.OracleScnPosition.encode(message.oracleScnPosition, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.sqlServerLsnPosition != null && Object.hasOwnProperty.call(message, "sqlServerLsnPosition")) - $root.google.cloud.datastream.v1.SqlServerLsnPosition.encode(message.sqlServerLsnPosition, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SpecificStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition} message SpecificStartPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecificStartPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpecificStartPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecificStartPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 101: { - message.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.decode(reader, reader.uint32()); - break; - } - case 102: { - message.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.decode(reader, reader.uint32()); - break; - } - case 103: { - message.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SpecificStartPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecificStartPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SpecificStartPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SpecificStartPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mysqlLogPosition != null && message.hasOwnProperty("mysqlLogPosition")) { - properties.position = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlLogPosition.verify(message.mysqlLogPosition); - if (error) - return "mysqlLogPosition." + error; - } - } - if (message.oracleScnPosition != null && message.hasOwnProperty("oracleScnPosition")) { - if (properties.position === 1) - return "position: multiple values"; - properties.position = 1; - { - var error = $root.google.cloud.datastream.v1.OracleScnPosition.verify(message.oracleScnPosition); - if (error) - return "oracleScnPosition." + error; - } - } - if (message.sqlServerLsnPosition != null && message.hasOwnProperty("sqlServerLsnPosition")) { - if (properties.position === 1) - return "position: multiple values"; - properties.position = 1; - { - var error = $root.google.cloud.datastream.v1.SqlServerLsnPosition.verify(message.sqlServerLsnPosition); - if (error) - return "sqlServerLsnPosition." + error; - } - } - return null; - }; - - /** - * Creates a SpecificStartPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition - */ - SpecificStartPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition) - return object; - var message = new $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition(); - if (object.mysqlLogPosition != null) { - if (typeof object.mysqlLogPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.mysqlLogPosition: object expected"); - message.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.fromObject(object.mysqlLogPosition); - } - if (object.oracleScnPosition != null) { - if (typeof object.oracleScnPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.oracleScnPosition: object expected"); - message.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.fromObject(object.oracleScnPosition); - } - if (object.sqlServerLsnPosition != null) { - if (typeof object.sqlServerLsnPosition !== "object") - throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.sqlServerLsnPosition: object expected"); - message.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.fromObject(object.sqlServerLsnPosition); - } - return message; - }; - - /** - * Creates a plain object from a SpecificStartPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} message SpecificStartPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SpecificStartPosition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.mysqlLogPosition != null && message.hasOwnProperty("mysqlLogPosition")) { - object.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.toObject(message.mysqlLogPosition, options); - if (options.oneofs) - object.position = "mysqlLogPosition"; - } - if (message.oracleScnPosition != null && message.hasOwnProperty("oracleScnPosition")) { - object.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.toObject(message.oracleScnPosition, options); - if (options.oneofs) - object.position = "oracleScnPosition"; - } - if (message.sqlServerLsnPosition != null && message.hasOwnProperty("sqlServerLsnPosition")) { - object.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.toObject(message.sqlServerLsnPosition, options); - if (options.oneofs) - object.position = "sqlServerLsnPosition"; - } - return object; - }; - - /** - * Converts this SpecificStartPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @instance - * @returns {Object.} JSON object - */ - SpecificStartPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SpecificStartPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SpecificStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition"; - }; - - return SpecificStartPosition; - })(); - - return CdcStrategy; - })(); - - v1.SqlServerLsnPosition = (function() { - - /** - * Properties of a SqlServerLsnPosition. - * @memberof google.cloud.datastream.v1 - * @interface ISqlServerLsnPosition - * @property {string|null} [lsn] SqlServerLsnPosition lsn - */ - - /** - * Constructs a new SqlServerLsnPosition. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SqlServerLsnPosition. - * @implements ISqlServerLsnPosition - * @constructor - * @param {google.cloud.datastream.v1.ISqlServerLsnPosition=} [properties] Properties to set - */ - function SqlServerLsnPosition(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]]; - } - - /** - * SqlServerLsnPosition lsn. - * @member {string} lsn - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @instance - */ - SqlServerLsnPosition.prototype.lsn = ""; - - /** - * Creates a new SqlServerLsnPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {google.cloud.datastream.v1.ISqlServerLsnPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition instance - */ - SqlServerLsnPosition.create = function create(properties) { - return new SqlServerLsnPosition(properties); - }; - - /** - * Encodes the specified SqlServerLsnPosition message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {google.cloud.datastream.v1.ISqlServerLsnPosition} message SqlServerLsnPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerLsnPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lsn != null && Object.hasOwnProperty.call(message, "lsn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lsn); - return writer; - }; - - /** - * Encodes the specified SqlServerLsnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {google.cloud.datastream.v1.ISqlServerLsnPosition} message SqlServerLsnPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlServerLsnPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlServerLsnPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerLsnPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerLsnPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lsn = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlServerLsnPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlServerLsnPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlServerLsnPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlServerLsnPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lsn != null && message.hasOwnProperty("lsn")) - if (!$util.isString(message.lsn)) - return "lsn: string expected"; - return null; - }; - - /** - * Creates a SqlServerLsnPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition - */ - SqlServerLsnPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SqlServerLsnPosition) - return object; - var message = new $root.google.cloud.datastream.v1.SqlServerLsnPosition(); - if (object.lsn != null) - message.lsn = String(object.lsn); - return message; - }; - - /** - * Creates a plain object from a SqlServerLsnPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {google.cloud.datastream.v1.SqlServerLsnPosition} message SqlServerLsnPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlServerLsnPosition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.lsn = ""; - if (message.lsn != null && message.hasOwnProperty("lsn")) - object.lsn = message.lsn; - return object; - }; - - /** - * Converts this SqlServerLsnPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @instance - * @returns {Object.} JSON object - */ - SqlServerLsnPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlServerLsnPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SqlServerLsnPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlServerLsnPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerLsnPosition"; - }; - - return SqlServerLsnPosition; - })(); - - v1.OracleScnPosition = (function() { - - /** - * Properties of an OracleScnPosition. - * @memberof google.cloud.datastream.v1 - * @interface IOracleScnPosition - * @property {number|Long|null} [scn] OracleScnPosition scn - */ - - /** - * Constructs a new OracleScnPosition. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleScnPosition. - * @implements IOracleScnPosition - * @constructor - * @param {google.cloud.datastream.v1.IOracleScnPosition=} [properties] Properties to set - */ - function OracleScnPosition(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]]; - } - - /** - * OracleScnPosition scn. - * @member {number|Long} scn - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @instance - */ - OracleScnPosition.prototype.scn = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new OracleScnPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {google.cloud.datastream.v1.IOracleScnPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition instance - */ - OracleScnPosition.create = function create(properties) { - return new OracleScnPosition(properties); - }; - - /** - * Encodes the specified OracleScnPosition message. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {google.cloud.datastream.v1.IOracleScnPosition} message OracleScnPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleScnPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scn != null && Object.hasOwnProperty.call(message, "scn")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.scn); - return writer; - }; - - /** - * Encodes the specified OracleScnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {google.cloud.datastream.v1.IOracleScnPosition} message OracleScnPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleScnPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleScnPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleScnPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleScnPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scn = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleScnPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleScnPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleScnPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleScnPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scn != null && message.hasOwnProperty("scn")) - if (!$util.isInteger(message.scn) && !(message.scn && $util.isInteger(message.scn.low) && $util.isInteger(message.scn.high))) - return "scn: integer|Long expected"; - return null; - }; - - /** - * Creates an OracleScnPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition - */ - OracleScnPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleScnPosition) - return object; - var message = new $root.google.cloud.datastream.v1.OracleScnPosition(); - if (object.scn != null) - if ($util.Long) - (message.scn = $util.Long.fromValue(object.scn)).unsigned = false; - else if (typeof object.scn === "string") - message.scn = parseInt(object.scn, 10); - else if (typeof object.scn === "number") - message.scn = object.scn; - else if (typeof object.scn === "object") - message.scn = new $util.LongBits(object.scn.low >>> 0, object.scn.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an OracleScnPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {google.cloud.datastream.v1.OracleScnPosition} message OracleScnPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleScnPosition.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.scn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.scn = options.longs === String ? "0" : 0; - if (message.scn != null && message.hasOwnProperty("scn")) - if (typeof message.scn === "number") - object.scn = options.longs === String ? String(message.scn) : message.scn; - else - object.scn = options.longs === String ? $util.Long.prototype.toString.call(message.scn) : options.longs === Number ? new $util.LongBits(message.scn.low >>> 0, message.scn.high >>> 0).toNumber() : message.scn; - return object; - }; - - /** - * Converts this OracleScnPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @instance - * @returns {Object.} JSON object - */ - OracleScnPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleScnPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleScnPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleScnPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleScnPosition"; - }; - - return OracleScnPosition; - })(); - - v1.MysqlLogPosition = (function() { - - /** - * Properties of a MysqlLogPosition. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlLogPosition - * @property {string|null} [logFile] MysqlLogPosition logFile - * @property {number|null} [logPosition] MysqlLogPosition logPosition - */ - - /** - * Constructs a new MysqlLogPosition. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlLogPosition. - * @implements IMysqlLogPosition - * @constructor - * @param {google.cloud.datastream.v1.IMysqlLogPosition=} [properties] Properties to set - */ - function MysqlLogPosition(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]]; - } - - /** - * MysqlLogPosition logFile. - * @member {string} logFile - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @instance - */ - MysqlLogPosition.prototype.logFile = ""; - - /** - * MysqlLogPosition logPosition. - * @member {number|null|undefined} logPosition - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @instance - */ - MysqlLogPosition.prototype.logPosition = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MysqlLogPosition _logPosition. - * @member {"logPosition"|undefined} _logPosition - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @instance - */ - Object.defineProperty(MysqlLogPosition.prototype, "_logPosition", { - get: $util.oneOfGetter($oneOfFields = ["logPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MysqlLogPosition instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {google.cloud.datastream.v1.IMysqlLogPosition=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition instance - */ - MysqlLogPosition.create = function create(properties) { - return new MysqlLogPosition(properties); - }; - - /** - * Encodes the specified MysqlLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {google.cloud.datastream.v1.IMysqlLogPosition} message MysqlLogPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlLogPosition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logFile != null && Object.hasOwnProperty.call(message, "logFile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logFile); - if (message.logPosition != null && Object.hasOwnProperty.call(message, "logPosition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logPosition); - return writer; - }; - - /** - * Encodes the specified MysqlLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {google.cloud.datastream.v1.IMysqlLogPosition} message MysqlLogPosition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlLogPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlLogPosition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlLogPosition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlLogPosition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logFile = reader.string(); - break; - } - case 2: { - message.logPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlLogPosition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlLogPosition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlLogPosition message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlLogPosition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.logFile != null && message.hasOwnProperty("logFile")) - if (!$util.isString(message.logFile)) - return "logFile: string expected"; - if (message.logPosition != null && message.hasOwnProperty("logPosition")) { - properties._logPosition = 1; - if (!$util.isInteger(message.logPosition)) - return "logPosition: integer expected"; - } - return null; - }; - - /** - * Creates a MysqlLogPosition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition - */ - MysqlLogPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlLogPosition) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlLogPosition(); - if (object.logFile != null) - message.logFile = String(object.logFile); - if (object.logPosition != null) - message.logPosition = object.logPosition | 0; - return message; - }; - - /** - * Creates a plain object from a MysqlLogPosition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {google.cloud.datastream.v1.MysqlLogPosition} message MysqlLogPosition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlLogPosition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.logFile = ""; - if (message.logFile != null && message.hasOwnProperty("logFile")) - object.logFile = message.logFile; - if (message.logPosition != null && message.hasOwnProperty("logPosition")) { - object.logPosition = message.logPosition; - if (options.oneofs) - object._logPosition = "logPosition"; - } - return object; - }; - - /** - * Converts this MysqlLogPosition to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @instance - * @returns {Object.} JSON object - */ - MysqlLogPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlLogPosition - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlLogPosition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlLogPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlLogPosition"; - }; - - return MysqlLogPosition; - })(); - - return v1; - })(); - - return datastream; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - } - 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) { - 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(); - 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; - } - 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; - } - } - 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; - } - } - 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 = ""; - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - 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) { - 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(); - 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 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; - } - 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); - } - 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; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, 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"; - }; - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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) { - if (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; - - /** - * 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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 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; - } - 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); - } - 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.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 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) { - 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(); - 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) { - 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(); - 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; - })(); - - /** - * 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; - })(); - - /** - * 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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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_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[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} [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.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 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); - 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) { - 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(); - 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 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.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 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.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_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 = []; - } - 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; - 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 - */ - - /** - * 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; - - /** - * 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]); - 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) { - 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(); - 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; - } - 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"; - } - 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]); - } - 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; - } - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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]); - 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) { - 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(); - 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; - } - 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"; - } - 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]); - } - 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; - } - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 {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 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.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) { - 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(); - 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 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.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.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[".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.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) { - 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(); - 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 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_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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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 {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 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.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) { - 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(); - 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 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.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.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; - } - 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.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) { - 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(); - 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 - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * 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; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * 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.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).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) { - 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(); - 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; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - 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"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - 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]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - 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.longrunning.operationInfo"] = 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.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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); - 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) { - 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(); - 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; - } - 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; - } - 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; - } - 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; - } - 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; - 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; - })(); - - 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) { - 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(); - 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 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 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_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_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} [features] FeatureSetEditionDefault features - */ - - /** - * 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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = 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.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.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - 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) { - 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(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $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 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + 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_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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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) { - 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(); - 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.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @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 Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(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]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(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]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.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 GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(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]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - 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 ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(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]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.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 CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(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]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.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 DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(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]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(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]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1/protos/protos.json b/owl-bot-staging/google-cloud-datastream/v1/protos/protos.json deleted file mode 100644 index 01f10bc6797..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/protos/protos.json +++ /dev/null @@ -1,5536 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "datastream": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Datastream.V1", - "go_package": "cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb", - "java_multiple_files": true, - "java_outer_classname": "DatastreamResourcesProto", - "java_package": "com.google.cloud.datastream.v1", - "php_namespace": "Google\\Cloud\\Datastream\\V1", - "ruby_package": "Google::Cloud::Datastream::V1", - "(google.api.resource_definition).type": "compute.googleapis.com/Networks", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" - }, - "nested": { - "Datastream": { - "options": { - "(google.api.default_host)": "datastream.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectionProfiles": { - "requestType": "ListConnectionProfilesRequest", - "responseType": "ListConnectionProfilesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/connectionProfiles", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/connectionProfiles" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetConnectionProfile": { - "requestType": "GetConnectionProfileRequest", - "responseType": "ConnectionProfile", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/connectionProfiles/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateConnectionProfile": { - "requestType": "CreateConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/connectionProfiles", - "(google.api.http).body": "connection_profile", - "(google.api.method_signature)": "parent,connection_profile,connection_profile_id", - "(google.longrunning.operation_info).response_type": "ConnectionProfile", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/connectionProfiles", - "body": "connection_profile" - } - }, - { - "(google.api.method_signature)": "parent,connection_profile,connection_profile_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConnectionProfile", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectionProfile": { - "requestType": "UpdateConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.http).body": "connection_profile", - "(google.api.method_signature)": "connection_profile,update_mask", - "(google.longrunning.operation_info).response_type": "ConnectionProfile", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}", - "body": "connection_profile" - } - }, - { - "(google.api.method_signature)": "connection_profile,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConnectionProfile", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectionProfile": { - "requestType": "DeleteConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/connectionProfiles/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DiscoverConnectionProfile": { - "requestType": "DiscoverConnectionProfileRequest", - "responseType": "DiscoverConnectionProfileResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover", - "body": "*" - } - } - ] - }, - "ListStreams": { - "requestType": "ListStreamsRequest", - "responseType": "ListStreamsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/streams", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/streams" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetStream": { - "requestType": "GetStreamRequest", - "responseType": "Stream", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/streams/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/streams/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateStream": { - "requestType": "CreateStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/streams", - "(google.api.http).body": "stream", - "(google.api.method_signature)": "parent,stream,stream_id", - "(google.longrunning.operation_info).response_type": "Stream", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/streams", - "body": "stream" - } - }, - { - "(google.api.method_signature)": "parent,stream,stream_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Stream", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateStream": { - "requestType": "UpdateStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{stream.name=projects/*/locations/*/streams/*}", - "(google.api.http).body": "stream", - "(google.api.method_signature)": "stream,update_mask", - "(google.longrunning.operation_info).response_type": "Stream", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{stream.name=projects/*/locations/*/streams/*}", - "body": "stream" - } - }, - { - "(google.api.method_signature)": "stream,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Stream", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteStream": { - "requestType": "DeleteStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/streams/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/streams/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RunStream": { - "requestType": "RunStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/streams/*}:run", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Stream", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/streams/*}:run", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Stream", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetStreamObject": { - "requestType": "GetStreamObjectRequest", - "responseType": "StreamObject", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/streams/*/objects/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/streams/*/objects/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "LookupStreamObject": { - "requestType": "LookupStreamObjectRequest", - "responseType": "StreamObject", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup", - "body": "*" - } - } - ] - }, - "ListStreamObjects": { - "requestType": "ListStreamObjectsRequest", - "responseType": "ListStreamObjectsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/streams/*}/objects", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/streams/*}/objects" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "StartBackfillJob": { - "requestType": "StartBackfillJobRequest", - "responseType": "StartBackfillJobResponse", - "options": { - "(google.api.http).post": "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob", - "(google.api.http).body": "*", - "(google.api.method_signature)": "object" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob", - "body": "*" - } - }, - { - "(google.api.method_signature)": "object" - } - ] - }, - "StopBackfillJob": { - "requestType": "StopBackfillJobRequest", - "responseType": "StopBackfillJobResponse", - "options": { - "(google.api.http).post": "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob", - "(google.api.http).body": "*", - "(google.api.method_signature)": "object" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob", - "body": "*" - } - }, - { - "(google.api.method_signature)": "object" - } - ] - }, - "FetchStaticIps": { - "requestType": "FetchStaticIpsRequest", - "responseType": "FetchStaticIpsResponse", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*}:fetchStaticIps", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*}:fetchStaticIps" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreatePrivateConnection": { - "requestType": "CreatePrivateConnectionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/privateConnections", - "(google.api.http).body": "private_connection", - "(google.api.method_signature)": "parent,private_connection,private_connection_id", - "(google.longrunning.operation_info).response_type": "PrivateConnection", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/privateConnections", - "body": "private_connection" - } - }, - { - "(google.api.method_signature)": "parent,private_connection,private_connection_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "PrivateConnection", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetPrivateConnection": { - "requestType": "GetPrivateConnectionRequest", - "responseType": "PrivateConnection", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/privateConnections/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/privateConnections/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListPrivateConnections": { - "requestType": "ListPrivateConnectionsRequest", - "responseType": "ListPrivateConnectionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/privateConnections", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/privateConnections" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeletePrivateConnection": { - "requestType": "DeletePrivateConnectionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/privateConnections/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/privateConnections/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateRoute": { - "requestType": "CreateRouteRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "(google.api.http).body": "route", - "(google.api.method_signature)": "parent,route,route_id", - "(google.longrunning.operation_info).response_type": "Route", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "body": "route" - } - }, - { - "(google.api.method_signature)": "parent,route,route_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Route", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetRoute": { - "requestType": "GetRouteRequest", - "responseType": "Route", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListRoutes": { - "requestType": "ListRoutesRequest", - "responseType": "ListRoutesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteRoute": { - "requestType": "DeleteRouteRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "DiscoverConnectionProfileRequest": { - "oneofs": { - "target": { - "oneof": [ - "connectionProfile", - "connectionProfileName" - ] - }, - "hierarchy": { - "oneof": [ - "fullHierarchy", - "hierarchyDepth" - ] - }, - "dataObject": { - "oneof": [ - "oracleRdbms", - "mysqlRdbms", - "postgresqlRdbms", - "sqlServerRdbms" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 200 - }, - "connectionProfileName": { - "type": "string", - "id": 201 - }, - "fullHierarchy": { - "type": "bool", - "id": 3 - }, - "hierarchyDepth": { - "type": "int32", - "id": 4 - }, - "oracleRdbms": { - "type": "OracleRdbms", - "id": 100 - }, - "mysqlRdbms": { - "type": "MysqlRdbms", - "id": 101 - }, - "postgresqlRdbms": { - "type": "PostgresqlRdbms", - "id": 102 - }, - "sqlServerRdbms": { - "type": "SqlServerRdbms", - "id": 103 - } - } - }, - "DiscoverConnectionProfileResponse": { - "oneofs": { - "dataObject": { - "oneof": [ - "oracleRdbms", - "mysqlRdbms", - "postgresqlRdbms", - "sqlServerRdbms" - ] - } - }, - "fields": { - "oracleRdbms": { - "type": "OracleRdbms", - "id": 100 - }, - "mysqlRdbms": { - "type": "MysqlRdbms", - "id": 101 - }, - "postgresqlRdbms": { - "type": "PostgresqlRdbms", - "id": 102 - }, - "sqlServerRdbms": { - "type": "SqlServerRdbms", - "id": 103 - } - } - }, - "FetchStaticIpsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "FetchStaticIpsResponse": { - "fields": { - "staticIps": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListConnectionProfilesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectionProfilesResponse": { - "fields": { - "connectionProfiles": { - "rule": "repeated", - "type": "ConnectionProfile", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectionProfileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - } - } - }, - "CreateConnectionProfileRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "connectionProfileId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateConnectionProfileRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteConnectionProfileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListStreamsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Stream" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListStreamsResponse": { - "fields": { - "streams": { - "rule": "repeated", - "type": "Stream", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetStreamRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - } - } - }, - "CreateStreamRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Stream" - } - }, - "streamId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "stream": { - "type": "Stream", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateStreamRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stream": { - "type": "Stream", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteStreamRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RunStreamRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - }, - "cdcStrategy": { - "type": "CdcStrategy", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetStreamObjectRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/StreamObject" - } - } - } - }, - "LookupStreamObjectRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - }, - "sourceObjectIdentifier": { - "type": "SourceObjectIdentifier", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StartBackfillJobRequest": { - "fields": { - "object": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/StreamObject" - } - } - } - }, - "StartBackfillJobResponse": { - "fields": { - "object": { - "type": "StreamObject", - "id": 1 - } - } - }, - "StopBackfillJobRequest": { - "fields": { - "object": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/StreamObject" - } - } - } - }, - "StopBackfillJobResponse": { - "fields": { - "object": { - "type": "StreamObject", - "id": 1 - } - } - }, - "ListStreamObjectsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/StreamObject" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListStreamObjectsResponse": { - "fields": { - "streamObjects": { - "rule": "repeated", - "type": "StreamObject", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "validationResult": { - "type": "ValidationResult", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreatePrivateConnectionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/PrivateConnection" - } - }, - "privateConnectionId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "privateConnection": { - "type": "PrivateConnection", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPrivateConnectionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/PrivateConnection" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListPrivateConnectionsResponse": { - "fields": { - "privateConnections": { - "rule": "repeated", - "type": "PrivateConnection", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeletePrivateConnectionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/PrivateConnection" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetPrivateConnectionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/PrivateConnection" - } - } - } - }, - "CreateRouteRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Route" - } - }, - "routeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "route": { - "type": "Route", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListRoutesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Route" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListRoutesResponse": { - "fields": { - "routes": { - "rule": "repeated", - "type": "Route", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeleteRouteRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Route" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetRouteRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Route" - } - } - } - }, - "OracleProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "databaseService": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "connectionAttributes": { - "keyType": "string", - "type": "string", - "id": 6 - }, - "oracleSslConfig": { - "type": "OracleSslConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oracleAsmConfig": { - "type": "OracleAsmConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "secretManagerStoredPassword": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "OracleAsmConfig": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "asmService": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "connectionAttributes": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oracleSslConfig": { - "type": "OracleSslConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MysqlProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "sslConfig": { - "type": "MysqlSslConfig", - "id": 5 - } - } - }, - "PostgresqlProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "database": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sslConfig": { - "type": "PostgresqlSslConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SqlServerProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "database": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GcsProfile": { - "fields": { - "bucket": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "rootPath": { - "type": "string", - "id": 2 - } - } - }, - "BigQueryProfile": { - "fields": {} - }, - "StaticServiceIpConnectivity": { - "fields": {} - }, - "ForwardSshTunnelConnectivity": { - "oneofs": { - "authenticationMethod": { - "oneof": [ - "password", - "privateKey" - ] - } - }, - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "username": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 3 - }, - "password": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "privateKey": { - "type": "string", - "id": 101, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - } - } - }, - "VpcPeeringConfig": { - "fields": { - "vpc": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "compute.googleapis.com/Networks" - } - }, - "subnet": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PrivateConnection": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/PrivateConnection", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/privateConnections/{private_connection}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "error": { - "type": "Error", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "vpcPeeringConfig": { - "type": "VpcPeeringConfig", - "id": 100 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "CREATED": 2, - "FAILED": 3, - "DELETING": 4, - "FAILED_TO_DELETE": 5 - } - } - } - }, - "PrivateConnectivity": { - "fields": { - "privateConnection": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/PrivateConnection" - } - } - } - }, - "Route": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/Route", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationAddress": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationPort": { - "type": "int32", - "id": 7 - } - } - }, - "MysqlSslConfig": { - "fields": { - "clientKey": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "clientKeySet": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientCertificate": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "clientCertificateSet": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "caCertificate": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "caCertificateSet": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "OracleSslConfig": { - "fields": { - "caCertificate": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "caCertificateSet": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "PostgresqlSslConfig": { - "oneofs": { - "encryptionSetting": { - "oneof": [ - "serverVerification", - "serverAndClientVerification" - ] - } - }, - "fields": { - "serverVerification": { - "type": "ServerVerification", - "id": 1 - }, - "serverAndClientVerification": { - "type": "ServerAndClientVerification", - "id": 2 - } - }, - "nested": { - "ServerVerification": { - "fields": { - "caCertificate": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ServerAndClientVerification": { - "fields": { - "clientCertificate": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clientKey": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "caCertificate": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "ConnectionProfile": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/ConnectionProfile", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" - }, - "oneofs": { - "profile": { - "oneof": [ - "oracleProfile", - "gcsProfile", - "mysqlProfile", - "bigqueryProfile", - "postgresqlProfile", - "sqlServerProfile" - ] - }, - "connectivity": { - "oneof": [ - "staticServiceIpConnectivity", - "forwardSshConnectivity", - "privateConnectivity" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "oracleProfile": { - "type": "OracleProfile", - "id": 100 - }, - "gcsProfile": { - "type": "GcsProfile", - "id": 101 - }, - "mysqlProfile": { - "type": "MysqlProfile", - "id": 102 - }, - "bigqueryProfile": { - "type": "BigQueryProfile", - "id": 103 - }, - "postgresqlProfile": { - "type": "PostgresqlProfile", - "id": 104 - }, - "sqlServerProfile": { - "type": "SqlServerProfile", - "id": 105 - }, - "staticServiceIpConnectivity": { - "type": "StaticServiceIpConnectivity", - "id": 200 - }, - "forwardSshConnectivity": { - "type": "ForwardSshTunnelConnectivity", - "id": 201 - }, - "privateConnectivity": { - "type": "PrivateConnectivity", - "id": 202 - } - } - }, - "OracleColumn": { - "fields": { - "column": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "precision": { - "type": "int32", - "id": 4 - }, - "scale": { - "type": "int32", - "id": 5 - }, - "encoding": { - "type": "string", - "id": 6 - }, - "primaryKey": { - "type": "bool", - "id": 7 - }, - "nullable": { - "type": "bool", - "id": 8 - }, - "ordinalPosition": { - "type": "int32", - "id": 9 - } - } - }, - "OracleTable": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "oracleColumns": { - "rule": "repeated", - "type": "OracleColumn", - "id": 2 - } - } - }, - "OracleSchema": { - "fields": { - "schema": { - "type": "string", - "id": 1 - }, - "oracleTables": { - "rule": "repeated", - "type": "OracleTable", - "id": 2 - } - } - }, - "OracleRdbms": { - "fields": { - "oracleSchemas": { - "rule": "repeated", - "type": "OracleSchema", - "id": 1 - } - } - }, - "OracleSourceConfig": { - "oneofs": { - "largeObjectsHandling": { - "oneof": [ - "dropLargeObjects", - "streamLargeObjects" - ] - }, - "cdcMethod": { - "oneof": [ - "logMiner", - "binaryLogParser" - ] - } - }, - "fields": { - "includeObjects": { - "type": "OracleRdbms", - "id": 1 - }, - "excludeObjects": { - "type": "OracleRdbms", - "id": 2 - }, - "maxConcurrentCdcTasks": { - "type": "int32", - "id": 3 - }, - "maxConcurrentBackfillTasks": { - "type": "int32", - "id": 4 - }, - "dropLargeObjects": { - "type": "DropLargeObjects", - "id": 100 - }, - "streamLargeObjects": { - "type": "StreamLargeObjects", - "id": 102 - }, - "logMiner": { - "type": "LogMiner", - "id": 103 - }, - "binaryLogParser": { - "type": "BinaryLogParser", - "id": 104 - } - }, - "nested": { - "DropLargeObjects": { - "fields": {} - }, - "StreamLargeObjects": { - "fields": {} - }, - "LogMiner": { - "fields": {} - }, - "BinaryLogParser": { - "oneofs": { - "logFileAccess": { - "oneof": [ - "oracleAsmLogFileAccess", - "logFileDirectories" - ] - } - }, - "fields": { - "oracleAsmLogFileAccess": { - "type": "OracleAsmLogFileAccess", - "id": 1 - }, - "logFileDirectories": { - "type": "LogFileDirectories", - "id": 2 - } - }, - "nested": { - "OracleAsmLogFileAccess": { - "fields": {} - }, - "LogFileDirectories": { - "fields": { - "onlineLogDirectory": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "archivedLogDirectory": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - } - } - }, - "PostgresqlColumn": { - "fields": { - "column": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "precision": { - "type": "int32", - "id": 4 - }, - "scale": { - "type": "int32", - "id": 5 - }, - "primaryKey": { - "type": "bool", - "id": 7 - }, - "nullable": { - "type": "bool", - "id": 8 - }, - "ordinalPosition": { - "type": "int32", - "id": 9 - } - } - }, - "PostgresqlTable": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "postgresqlColumns": { - "rule": "repeated", - "type": "PostgresqlColumn", - "id": 2 - } - } - }, - "PostgresqlSchema": { - "fields": { - "schema": { - "type": "string", - "id": 1 - }, - "postgresqlTables": { - "rule": "repeated", - "type": "PostgresqlTable", - "id": 2 - } - } - }, - "PostgresqlRdbms": { - "fields": { - "postgresqlSchemas": { - "rule": "repeated", - "type": "PostgresqlSchema", - "id": 1 - } - } - }, - "PostgresqlSourceConfig": { - "fields": { - "includeObjects": { - "type": "PostgresqlRdbms", - "id": 1 - }, - "excludeObjects": { - "type": "PostgresqlRdbms", - "id": 2 - }, - "replicationSlot": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "publication": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "maxConcurrentBackfillTasks": { - "type": "int32", - "id": 5 - } - } - }, - "SqlServerColumn": { - "fields": { - "column": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "precision": { - "type": "int32", - "id": 4 - }, - "scale": { - "type": "int32", - "id": 5 - }, - "primaryKey": { - "type": "bool", - "id": 6 - }, - "nullable": { - "type": "bool", - "id": 7 - }, - "ordinalPosition": { - "type": "int32", - "id": 8 - } - } - }, - "SqlServerTable": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "columns": { - "rule": "repeated", - "type": "SqlServerColumn", - "id": 2 - } - } - }, - "SqlServerSchema": { - "fields": { - "schema": { - "type": "string", - "id": 1 - }, - "tables": { - "rule": "repeated", - "type": "SqlServerTable", - "id": 2 - } - } - }, - "SqlServerRdbms": { - "fields": { - "schemas": { - "rule": "repeated", - "type": "SqlServerSchema", - "id": 1 - } - } - }, - "SqlServerSourceConfig": { - "oneofs": { - "cdcMethod": { - "oneof": [ - "transactionLogs", - "changeTables" - ] - } - }, - "fields": { - "includeObjects": { - "type": "SqlServerRdbms", - "id": 1 - }, - "excludeObjects": { - "type": "SqlServerRdbms", - "id": 2 - }, - "maxConcurrentCdcTasks": { - "type": "int32", - "id": 3 - }, - "maxConcurrentBackfillTasks": { - "type": "int32", - "id": 4 - }, - "transactionLogs": { - "type": "SqlServerTransactionLogs", - "id": 101 - }, - "changeTables": { - "type": "SqlServerChangeTables", - "id": 102 - } - } - }, - "SqlServerTransactionLogs": { - "fields": {} - }, - "SqlServerChangeTables": { - "fields": {} - }, - "MysqlColumn": { - "fields": { - "column": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "collation": { - "type": "string", - "id": 4 - }, - "primaryKey": { - "type": "bool", - "id": 5 - }, - "nullable": { - "type": "bool", - "id": 6 - }, - "ordinalPosition": { - "type": "int32", - "id": 7 - }, - "precision": { - "type": "int32", - "id": 8 - }, - "scale": { - "type": "int32", - "id": 9 - } - } - }, - "MysqlTable": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "mysqlColumns": { - "rule": "repeated", - "type": "MysqlColumn", - "id": 2 - } - } - }, - "MysqlDatabase": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "mysqlTables": { - "rule": "repeated", - "type": "MysqlTable", - "id": 2 - } - } - }, - "MysqlRdbms": { - "fields": { - "mysqlDatabases": { - "rule": "repeated", - "type": "MysqlDatabase", - "id": 1 - } - } - }, - "MysqlSourceConfig": { - "oneofs": { - "cdcMethod": { - "oneof": [ - "binaryLogPosition", - "gtid" - ] - } - }, - "fields": { - "includeObjects": { - "type": "MysqlRdbms", - "id": 1 - }, - "excludeObjects": { - "type": "MysqlRdbms", - "id": 2 - }, - "maxConcurrentCdcTasks": { - "type": "int32", - "id": 3 - }, - "maxConcurrentBackfillTasks": { - "type": "int32", - "id": 4 - }, - "binaryLogPosition": { - "type": "BinaryLogPosition", - "id": 101 - }, - "gtid": { - "type": "Gtid", - "id": 102 - } - }, - "nested": { - "BinaryLogPosition": { - "fields": {} - }, - "Gtid": { - "fields": {} - } - } - }, - "SourceConfig": { - "oneofs": { - "sourceStreamConfig": { - "oneof": [ - "oracleSourceConfig", - "mysqlSourceConfig", - "postgresqlSourceConfig", - "sqlServerSourceConfig" - ] - } - }, - "fields": { - "sourceConnectionProfile": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "oracleSourceConfig": { - "type": "OracleSourceConfig", - "id": 100 - }, - "mysqlSourceConfig": { - "type": "MysqlSourceConfig", - "id": 101 - }, - "postgresqlSourceConfig": { - "type": "PostgresqlSourceConfig", - "id": 102 - }, - "sqlServerSourceConfig": { - "type": "SqlServerSourceConfig", - "id": 103 - } - } - }, - "AvroFileFormat": { - "fields": {} - }, - "JsonFileFormat": { - "fields": { - "schemaFileFormat": { - "type": "SchemaFileFormat", - "id": 1 - }, - "compression": { - "type": "JsonCompression", - "id": 2 - } - }, - "nested": { - "SchemaFileFormat": { - "values": { - "SCHEMA_FILE_FORMAT_UNSPECIFIED": 0, - "NO_SCHEMA_FILE": 1, - "AVRO_SCHEMA_FILE": 2 - } - }, - "JsonCompression": { - "values": { - "JSON_COMPRESSION_UNSPECIFIED": 0, - "NO_COMPRESSION": 1, - "GZIP": 2 - } - } - } - }, - "GcsDestinationConfig": { - "oneofs": { - "fileFormat": { - "oneof": [ - "avroFileFormat", - "jsonFileFormat" - ] - } - }, - "fields": { - "path": { - "type": "string", - "id": 1 - }, - "fileRotationMb": { - "type": "int32", - "id": 2 - }, - "fileRotationInterval": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "avroFileFormat": { - "type": "AvroFileFormat", - "id": 100 - }, - "jsonFileFormat": { - "type": "JsonFileFormat", - "id": 101 - } - } - }, - "BigQueryDestinationConfig": { - "oneofs": { - "datasetConfig": { - "oneof": [ - "singleTargetDataset", - "sourceHierarchyDatasets" - ] - }, - "writeMode": { - "oneof": [ - "merge", - "appendOnly" - ] - } - }, - "fields": { - "singleTargetDataset": { - "type": "SingleTargetDataset", - "id": 201 - }, - "sourceHierarchyDatasets": { - "type": "SourceHierarchyDatasets", - "id": 202 - }, - "dataFreshness": { - "type": "google.protobuf.Duration", - "id": 300 - }, - "merge": { - "type": "Merge", - "id": 301 - }, - "appendOnly": { - "type": "AppendOnly", - "id": 302 - } - }, - "nested": { - "SingleTargetDataset": { - "fields": { - "datasetId": { - "type": "string", - "id": 1 - } - } - }, - "SourceHierarchyDatasets": { - "fields": { - "datasetTemplate": { - "type": "DatasetTemplate", - "id": 2 - } - }, - "nested": { - "DatasetTemplate": { - "fields": { - "location": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "datasetIdPrefix": { - "type": "string", - "id": 2 - }, - "kmsKeyName": { - "type": "string", - "id": 3 - } - } - } - } - }, - "AppendOnly": { - "fields": {} - }, - "Merge": { - "fields": {} - } - } - }, - "DestinationConfig": { - "oneofs": { - "destinationStreamConfig": { - "oneof": [ - "gcsDestinationConfig", - "bigqueryDestinationConfig" - ] - } - }, - "fields": { - "destinationConnectionProfile": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "gcsDestinationConfig": { - "type": "GcsDestinationConfig", - "id": 100 - }, - "bigqueryDestinationConfig": { - "type": "BigQueryDestinationConfig", - "id": 101 - } - } - }, - "Stream": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/Stream", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/streams/{stream}" - }, - "oneofs": { - "backfillStrategy": { - "oneof": [ - "backfillAll", - "backfillNone" - ] - }, - "_customerManagedEncryptionKey": { - "oneof": [ - "customerManagedEncryptionKey" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sourceConfig": { - "type": "SourceConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationConfig": { - "type": "DestinationConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 8 - }, - "backfillAll": { - "type": "BackfillAllStrategy", - "id": 101 - }, - "backfillNone": { - "type": "BackfillNoneStrategy", - "id": 102 - }, - "errors": { - "rule": "repeated", - "type": "Error", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customerManagedEncryptionKey": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "lastRecoveryTime": { - "type": "google.protobuf.Timestamp", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "NOT_STARTED": 1, - "RUNNING": 2, - "PAUSED": 3, - "MAINTENANCE": 4, - "FAILED": 5, - "FAILED_PERMANENTLY": 6, - "STARTING": 7, - "DRAINING": 8 - } - }, - "BackfillAllStrategy": { - "oneofs": { - "excludedObjects": { - "oneof": [ - "oracleExcludedObjects", - "mysqlExcludedObjects", - "postgresqlExcludedObjects", - "sqlServerExcludedObjects" - ] - } - }, - "fields": { - "oracleExcludedObjects": { - "type": "OracleRdbms", - "id": 1 - }, - "mysqlExcludedObjects": { - "type": "MysqlRdbms", - "id": 2 - }, - "postgresqlExcludedObjects": { - "type": "PostgresqlRdbms", - "id": 3 - }, - "sqlServerExcludedObjects": { - "type": "SqlServerRdbms", - "id": 4 - } - } - }, - "BackfillNoneStrategy": { - "fields": {} - } - } - }, - "StreamObject": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/StreamObject", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/streams/{stream}/objects/{object}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "errors": { - "rule": "repeated", - "type": "Error", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backfillJob": { - "type": "BackfillJob", - "id": 7 - }, - "sourceObject": { - "type": "SourceObjectIdentifier", - "id": 8 - } - } - }, - "SourceObjectIdentifier": { - "oneofs": { - "sourceIdentifier": { - "oneof": [ - "oracleIdentifier", - "mysqlIdentifier", - "postgresqlIdentifier", - "sqlServerIdentifier" - ] - } - }, - "fields": { - "oracleIdentifier": { - "type": "OracleObjectIdentifier", - "id": 1 - }, - "mysqlIdentifier": { - "type": "MysqlObjectIdentifier", - "id": 2 - }, - "postgresqlIdentifier": { - "type": "PostgresqlObjectIdentifier", - "id": 3 - }, - "sqlServerIdentifier": { - "type": "SqlServerObjectIdentifier", - "id": 4 - } - }, - "nested": { - "OracleObjectIdentifier": { - "fields": { - "schema": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "table": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PostgresqlObjectIdentifier": { - "fields": { - "schema": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "table": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "MysqlObjectIdentifier": { - "fields": { - "database": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "table": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SqlServerObjectIdentifier": { - "fields": { - "schema": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "table": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "BackfillJob": { - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "trigger": { - "type": "Trigger", - "id": 2 - }, - "lastStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastEndTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errors": { - "rule": "repeated", - "type": "Error", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "NOT_STARTED": 1, - "PENDING": 2, - "ACTIVE": 3, - "STOPPED": 4, - "FAILED": 5, - "COMPLETED": 6, - "UNSUPPORTED": 7 - } - }, - "Trigger": { - "values": { - "TRIGGER_UNSPECIFIED": 0, - "AUTOMATIC": 1, - "MANUAL": 2 - } - } - } - }, - "Error": { - "fields": { - "reason": { - "type": "string", - "id": 1 - }, - "errorUuid": { - "type": "string", - "id": 2 - }, - "message": { - "type": "string", - "id": 3 - }, - "errorTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "details": { - "keyType": "string", - "type": "string", - "id": 5 - } - } - }, - "ValidationResult": { - "fields": { - "validations": { - "rule": "repeated", - "type": "Validation", - "id": 1 - } - } - }, - "Validation": { - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "rule": "repeated", - "type": "ValidationMessage", - "id": 3 - }, - "code": { - "type": "string", - "id": 4 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "NOT_EXECUTED": 1, - "FAILED": 2, - "PASSED": 3, - "WARNING": 4 - } - } - } - }, - "ValidationMessage": { - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "level": { - "type": "Level", - "id": 2 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "code": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Level": { - "values": { - "LEVEL_UNSPECIFIED": 0, - "WARNING": 1, - "ERROR": 2 - } - } - } - }, - "CdcStrategy": { - "oneofs": { - "startPosition": { - "oneof": [ - "mostRecentStartPosition", - "nextAvailableStartPosition", - "specificStartPosition" - ] - } - }, - "fields": { - "mostRecentStartPosition": { - "type": "MostRecentStartPosition", - "id": 101, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "nextAvailableStartPosition": { - "type": "NextAvailableStartPosition", - "id": 102, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "specificStartPosition": { - "type": "SpecificStartPosition", - "id": 103, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "MostRecentStartPosition": { - "fields": {} - }, - "NextAvailableStartPosition": { - "fields": {} - }, - "SpecificStartPosition": { - "oneofs": { - "position": { - "oneof": [ - "mysqlLogPosition", - "oracleScnPosition", - "sqlServerLsnPosition" - ] - } - }, - "fields": { - "mysqlLogPosition": { - "type": "MysqlLogPosition", - "id": 101 - }, - "oracleScnPosition": { - "type": "OracleScnPosition", - "id": 102 - }, - "sqlServerLsnPosition": { - "type": "SqlServerLsnPosition", - "id": 103 - } - } - } - } - }, - "SqlServerLsnPosition": { - "fields": { - "lsn": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "OracleScnPosition": { - "fields": { - "scn": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "MysqlLogPosition": { - "oneofs": { - "_logPosition": { - "oneof": [ - "logPosition" - ] - } - }, - "fields": { - "logFile": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "logPosition": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "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 - } - } - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "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 - } - } - } - } - }, - "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": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "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": { - "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, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "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": { - "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 - } - }, - "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": { - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "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 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "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": { - "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 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "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": { - "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 - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "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 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "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": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "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": { - "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": { - "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": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 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 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "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 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "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 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_connection_profile.js deleted file mode 100644 index eedd6d4a64d..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_connection_profile.js +++ /dev/null @@ -1,95 +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 -// -// 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, connectionProfileId, connectionProfile) { - // [START datastream_v1_generated_Datastream_CreateConnectionProfile_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 parent that owns the collection of ConnectionProfiles. - */ - // const parent = 'abc123' - /** - * Required. The connection profile identifier. - */ - // const connectionProfileId = 'abc123' - /** - * Required. The connection profile resource to create. - */ - // const connectionProfile = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - */ - // const validateOnly = true - /** - * Optional. Create the connection profile without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateConnectionProfile() { - // Construct request - const request = { - parent, - connectionProfileId, - connectionProfile, - }; - - // Run request - const [operation] = await datastreamClient.createConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectionProfile(); - // [END datastream_v1_generated_Datastream_CreateConnectionProfile_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-datastream/v1/samples/generated/v1/datastream.create_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_private_connection.js deleted file mode 100644 index 4d2c15fbea9..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_private_connection.js +++ /dev/null @@ -1,90 +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 -// -// 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, privateConnectionId, privateConnection) { - // [START datastream_v1_generated_Datastream_CreatePrivateConnection_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 parent that owns the collection of PrivateConnections. - */ - // const parent = 'abc123' - /** - * Required. The private connectivity identifier. - */ - // const privateConnectionId = 'abc123' - /** - * Required. The Private Connectivity resource to create. - */ - // const privateConnection = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, will skip validations. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreatePrivateConnection() { - // Construct request - const request = { - parent, - privateConnectionId, - privateConnection, - }; - - // Run request - const [operation] = await datastreamClient.createPrivateConnection(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreatePrivateConnection(); - // [END datastream_v1_generated_Datastream_CreatePrivateConnection_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-datastream/v1/samples/generated/v1/datastream.create_route.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_route.js deleted file mode 100644 index 6cd05c67675..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_route.js +++ /dev/null @@ -1,86 +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 -// -// 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, routeId, route) { - // [START datastream_v1_generated_Datastream_CreateRoute_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 parent that owns the collection of Routes. - */ - // const parent = 'abc123' - /** - * Required. The Route identifier. - */ - // const routeId = 'abc123' - /** - * Required. The Route resource to create. - */ - // const route = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateRoute() { - // Construct request - const request = { - parent, - routeId, - route, - }; - - // Run request - const [operation] = await datastreamClient.createRoute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRoute(); - // [END datastream_v1_generated_Datastream_CreateRoute_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-datastream/v1/samples/generated/v1/datastream.create_stream.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_stream.js deleted file mode 100644 index 1df9e0fddba..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.create_stream.js +++ /dev/null @@ -1,95 +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 -// -// 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, streamId, stream) { - // [START datastream_v1_generated_Datastream_CreateStream_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 parent that owns the collection of streams. - */ - // const parent = 'abc123' - /** - * Required. The stream identifier. - */ - // const streamId = 'abc123' - /** - * Required. The stream resource to create. - */ - // const stream = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - */ - // const validateOnly = true - /** - * Optional. Create the stream without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateStream() { - // Construct request - const request = { - parent, - streamId, - stream, - }; - - // Run request - const [operation] = await datastreamClient.createStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateStream(); - // [END datastream_v1_generated_Datastream_CreateStream_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-datastream/v1/samples/generated/v1/datastream.delete_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_connection_profile.js deleted file mode 100644 index f717b66f401..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_connection_profile.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1_generated_Datastream_DeleteConnectionProfile_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 connection profile resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteConnectionProfile() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectionProfile(); - // [END datastream_v1_generated_Datastream_DeleteConnectionProfile_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-datastream/v1/samples/generated/v1/datastream.delete_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_private_connection.js deleted file mode 100644 index 7c259afc155..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_private_connection.js +++ /dev/null @@ -1,81 +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 -// -// 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 datastream_v1_generated_Datastream_DeletePrivateConnection_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 private connectivity configuration to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeletePrivateConnection() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deletePrivateConnection(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePrivateConnection(); - // [END datastream_v1_generated_Datastream_DeletePrivateConnection_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-datastream/v1/samples/generated/v1/datastream.delete_route.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_route.js deleted file mode 100644 index 1fa6298ce96..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_route.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1_generated_Datastream_DeleteRoute_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 Route resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteRoute() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteRoute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteRoute(); - // [END datastream_v1_generated_Datastream_DeleteRoute_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-datastream/v1/samples/generated/v1/datastream.delete_stream.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_stream.js deleted file mode 100644 index 436b9b94dd5..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.delete_stream.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1_generated_Datastream_DeleteStream_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 stream resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteStream() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteStream(); - // [END datastream_v1_generated_Datastream_DeleteStream_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-datastream/v1/samples/generated/v1/datastream.discover_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.discover_connection_profile.js deleted file mode 100644 index 953809c4e96..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.discover_connection_profile.js +++ /dev/null @@ -1,95 +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 -// -// 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 datastream_v1_generated_Datastream_DiscoverConnectionProfile_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 parent resource of the connection profile type. Must be in - * the format `projects/* /locations/*`. - */ - // const parent = 'abc123' - /** - * An ad-hoc connection profile configuration. - */ - // const connectionProfile = {} - /** - * A reference to an existing connection profile. - */ - // const connectionProfileName = 'abc123' - /** - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - */ - // const fullHierarchy = true - /** - * The number of hierarchy levels below the current level to be retrieved. - */ - // const hierarchyDepth = 1234 - /** - * Oracle RDBMS to enrich with child data objects and metadata. - */ - // const oracleRdbms = {} - /** - * MySQL RDBMS to enrich with child data objects and metadata. - */ - // const mysqlRdbms = {} - /** - * PostgreSQL RDBMS to enrich with child data objects and metadata. - */ - // const postgresqlRdbms = {} - /** - * SQLServer RDBMS to enrich with child data objects and metadata. - */ - // const sqlServerRdbms = {} - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDiscoverConnectionProfile() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datastreamClient.discoverConnectionProfile(request); - console.log(response); - } - - callDiscoverConnectionProfile(); - // [END datastream_v1_generated_Datastream_DiscoverConnectionProfile_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-datastream/v1/samples/generated/v1/datastream.fetch_static_ips.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.fetch_static_ips.js deleted file mode 100644 index f933b3b6fae..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.fetch_static_ips.js +++ /dev/null @@ -1,73 +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 -// -// 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 datastream_v1_generated_Datastream_FetchStaticIps_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 resource name for the location for which static IPs should be - * returned. Must be in the format `projects/* /locations/*`. - */ - // const name = 'abc123' - /** - * Maximum number of Ips to return, will likely not be specified. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - */ - // const pageToken = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callFetchStaticIps() { - // Construct request - const request = { - name, - }; - - // Run request - const iterable = datastreamClient.fetchStaticIpsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callFetchStaticIps(); - // [END datastream_v1_generated_Datastream_FetchStaticIps_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-datastream/v1/samples/generated/v1/datastream.get_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_connection_profile.js deleted file mode 100644 index a2094deb5b0..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_connection_profile.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1_generated_Datastream_GetConnectionProfile_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 connection profile resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetConnectionProfile() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getConnectionProfile(request); - console.log(response); - } - - callGetConnectionProfile(); - // [END datastream_v1_generated_Datastream_GetConnectionProfile_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-datastream/v1/samples/generated/v1/datastream.get_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_private_connection.js deleted file mode 100644 index 415d564fe1a..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_private_connection.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1_generated_Datastream_GetPrivateConnection_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 private connectivity configuration to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetPrivateConnection() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getPrivateConnection(request); - console.log(response); - } - - callGetPrivateConnection(); - // [END datastream_v1_generated_Datastream_GetPrivateConnection_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-datastream/v1/samples/generated/v1/datastream.get_route.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_route.js deleted file mode 100644 index 53ca3da191c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_route.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1_generated_Datastream_GetRoute_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 Route resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetRoute() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getRoute(request); - console.log(response); - } - - callGetRoute(); - // [END datastream_v1_generated_Datastream_GetRoute_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-datastream/v1/samples/generated/v1/datastream.get_stream.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream.js deleted file mode 100644 index 3741d413cbd..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1_generated_Datastream_GetStream_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 stream resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetStream() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getStream(request); - console.log(response); - } - - callGetStream(); - // [END datastream_v1_generated_Datastream_GetStream_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-datastream/v1/samples/generated/v1/datastream.get_stream_object.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream_object.js deleted file mode 100644 index 3e6e18b25bb..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.get_stream_object.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1_generated_Datastream_GetStreamObject_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 stream object resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetStreamObject() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getStreamObject(request); - console.log(response); - } - - callGetStreamObject(); - // [END datastream_v1_generated_Datastream_GetStreamObject_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-datastream/v1/samples/generated/v1/datastream.list_connection_profiles.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_connection_profiles.js deleted file mode 100644 index 877aade73e9..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_connection_profiles.js +++ /dev/null @@ -1,84 +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 -// -// 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 datastream_v1_generated_Datastream_ListConnectionProfiles_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 parent that owns the collection of connection profiles. - */ - // const parent = 'abc123' - /** - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListConnectionProfiles() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listConnectionProfilesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectionProfiles(); - // [END datastream_v1_generated_Datastream_ListConnectionProfiles_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-datastream/v1/samples/generated/v1/datastream.list_private_connections.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_private_connections.js deleted file mode 100644 index 57a9d141552..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_private_connections.js +++ /dev/null @@ -1,87 +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 -// -// 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 datastream_v1_generated_Datastream_ListPrivateConnections_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 parent that owns the collection of private connectivity - * configurations. - */ - // const parent = 'abc123' - /** - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListPrivateConnections() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listPrivateConnectionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPrivateConnections(); - // [END datastream_v1_generated_Datastream_ListPrivateConnections_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-datastream/v1/samples/generated/v1/datastream.list_routes.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_routes.js deleted file mode 100644 index 6ebc6d99304..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_routes.js +++ /dev/null @@ -1,86 +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 -// -// 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 datastream_v1_generated_Datastream_ListRoutes_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 parent that owns the collection of Routess. - */ - // const parent = 'abc123' - /** - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListRoutes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listRoutesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRoutes(); - // [END datastream_v1_generated_Datastream_ListRoutes_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-datastream/v1/samples/generated/v1/datastream.list_stream_objects.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_stream_objects.js deleted file mode 100644 index 647201eb92c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_stream_objects.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1_generated_Datastream_ListStreamObjects_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 parent stream that owns the collection of objects. - */ - // const parent = 'abc123' - /** - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListStreamObjects() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listStreamObjectsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStreamObjects(); - // [END datastream_v1_generated_Datastream_ListStreamObjects_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-datastream/v1/samples/generated/v1/datastream.list_streams.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_streams.js deleted file mode 100644 index e95d5bf5f74..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.list_streams.js +++ /dev/null @@ -1,84 +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 -// -// 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 datastream_v1_generated_Datastream_ListStreams_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 parent that owns the collection of streams. - */ - // const parent = 'abc123' - /** - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListStreams() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listStreamsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStreams(); - // [END datastream_v1_generated_Datastream_ListStreams_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-datastream/v1/samples/generated/v1/datastream.lookup_stream_object.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.lookup_stream_object.js deleted file mode 100644 index a822c5d9bf4..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.lookup_stream_object.js +++ /dev/null @@ -1,66 +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 -// -// 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, sourceObjectIdentifier) { - // [START datastream_v1_generated_Datastream_LookupStreamObject_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 parent stream that owns the collection of objects. - */ - // const parent = 'abc123' - /** - * Required. The source object identifier which maps to the stream object. - */ - // const sourceObjectIdentifier = {} - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callLookupStreamObject() { - // Construct request - const request = { - parent, - sourceObjectIdentifier, - }; - - // Run request - const response = await datastreamClient.lookupStreamObject(request); - console.log(response); - } - - callLookupStreamObject(); - // [END datastream_v1_generated_Datastream_LookupStreamObject_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-datastream/v1/samples/generated/v1/datastream.run_stream.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.run_stream.js deleted file mode 100644 index 580dbbf6e9e..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.run_stream.js +++ /dev/null @@ -1,72 +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 -// -// 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 datastream_v1_generated_Datastream_RunStream_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. Name of the stream resource to start, in the format: - * projects/{project_id}/locations/{location}/streams/{stream_name} - */ - // const name = 'abc123' - /** - * Optional. The CDC strategy of the stream. If not set, the system's default - * value will be used. - */ - // const cdcStrategy = {} - /** - * Optional. Update the stream without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callRunStream() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.runStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRunStream(); - // [END datastream_v1_generated_Datastream_RunStream_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-datastream/v1/samples/generated/v1/datastream.start_backfill_job.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.start_backfill_job.js deleted file mode 100644 index 7fe4a323e7f..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.start_backfill_job.js +++ /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 -// -// 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(object) { - // [START datastream_v1_generated_Datastream_StartBackfillJob_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 stream object resource to start a backfill job - * for. - */ - // const object = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callStartBackfillJob() { - // Construct request - const request = { - object, - }; - - // Run request - const response = await datastreamClient.startBackfillJob(request); - console.log(response); - } - - callStartBackfillJob(); - // [END datastream_v1_generated_Datastream_StartBackfillJob_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-datastream/v1/samples/generated/v1/datastream.stop_backfill_job.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.stop_backfill_job.js deleted file mode 100644 index e1d36f2e4bf..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.stop_backfill_job.js +++ /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 -// -// 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(object) { - // [START datastream_v1_generated_Datastream_StopBackfillJob_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 stream object resource to stop the backfill job - * for. - */ - // const object = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callStopBackfillJob() { - // Construct request - const request = { - object, - }; - - // Run request - const response = await datastreamClient.stopBackfillJob(request); - console.log(response); - } - - callStopBackfillJob(); - // [END datastream_v1_generated_Datastream_StopBackfillJob_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-datastream/v1/samples/generated/v1/datastream.update_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_connection_profile.js deleted file mode 100644 index 10977db1b13..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_connection_profile.js +++ /dev/null @@ -1,93 +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 -// -// 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(connectionProfile) { - // [START datastream_v1_generated_Datastream_UpdateConnectionProfile_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. - */ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The connection profile to update. - */ - // const connectionProfile = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - */ - // const validateOnly = true - /** - * Optional. Update the connection profile without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callUpdateConnectionProfile() { - // Construct request - const request = { - connectionProfile, - }; - - // Run request - const [operation] = await datastreamClient.updateConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectionProfile(); - // [END datastream_v1_generated_Datastream_UpdateConnectionProfile_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-datastream/v1/samples/generated/v1/datastream.update_stream.js b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_stream.js deleted file mode 100644 index a39016c5b1a..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/datastream.update_stream.js +++ /dev/null @@ -1,93 +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 -// -// 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(stream) { - // [START datastream_v1_generated_Datastream_UpdateStream_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. - */ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The stream resource to update. - */ - // const stream = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - */ - // const validateOnly = true - /** - * Optional. Update the stream without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callUpdateStream() { - // Construct request - const request = { - stream, - }; - - // Run request - const [operation] = await datastreamClient.updateStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateStream(); - // [END datastream_v1_generated_Datastream_UpdateStream_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-datastream/v1/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json b/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json deleted file mode 100644 index 7e6ede30619..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json +++ /dev/null @@ -1,1299 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datastream", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.datastream.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "datastream_v1_generated_Datastream_ListConnectionProfiles_async", - "title": "Datastream listConnectionProfiles Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list connection profiles created in a project and location.", - "canonical": true, - "file": "datastream.list_connection_profiles.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectionProfiles", - "fullName": "google.cloud.datastream.v1.Datastream.ListConnectionProfiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ListConnectionProfilesResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "ListConnectionProfiles", - "fullName": "google.cloud.datastream.v1.Datastream.ListConnectionProfiles", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_GetConnectionProfile_async", - "title": "Datastream getConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a connection profile.", - "canonical": true, - "file": "datastream.get_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.GetConnectionProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ConnectionProfile", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "GetConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.GetConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_CreateConnectionProfile_async", - "title": "Datastream createConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a connection profile in a project and location.", - "canonical": true, - "file": "datastream.create_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.CreateConnectionProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1.ConnectionProfile" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "CreateConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.CreateConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_UpdateConnectionProfile_async", - "title": "Datastream updateConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to update the parameters of a connection profile.", - "canonical": true, - "file": "datastream.update_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.UpdateConnectionProfile", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1.ConnectionProfile" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "UpdateConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.UpdateConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_DeleteConnectionProfile_async", - "title": "Datastream deleteConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a connection profile.", - "canonical": true, - "file": "datastream.delete_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteConnectionProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "DeleteConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_DiscoverConnectionProfile_async", - "title": "Datastream discoverConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects of a parent data object that's optionally supplied in the request.", - "canonical": true, - "file": "datastream.discover_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DiscoverConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.DiscoverConnectionProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1.ConnectionProfile" - }, - { - "name": "connection_profile_name", - "type": "TYPE_STRING" - }, - { - "name": "full_hierarchy", - "type": "TYPE_BOOL" - }, - { - "name": "hierarchy_depth", - "type": "TYPE_INT32" - }, - { - "name": "oracle_rdbms", - "type": ".google.cloud.datastream.v1.OracleRdbms" - }, - { - "name": "mysql_rdbms", - "type": ".google.cloud.datastream.v1.MysqlRdbms" - }, - { - "name": "postgresql_rdbms", - "type": ".google.cloud.datastream.v1.PostgresqlRdbms" - }, - { - "name": "sql_server_rdbms", - "type": ".google.cloud.datastream.v1.SqlServerRdbms" - } - ], - "resultType": ".google.cloud.datastream.v1.DiscoverConnectionProfileResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "DiscoverConnectionProfile", - "fullName": "google.cloud.datastream.v1.Datastream.DiscoverConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_ListStreams_async", - "title": "Datastream listStreams Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list streams in a project and location.", - "canonical": true, - "file": "datastream.list_streams.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStreams", - "fullName": "google.cloud.datastream.v1.Datastream.ListStreams", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ListStreamsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "ListStreams", - "fullName": "google.cloud.datastream.v1.Datastream.ListStreams", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_GetStream_async", - "title": "Datastream getStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a stream.", - "canonical": true, - "file": "datastream.get_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStream", - "fullName": "google.cloud.datastream.v1.Datastream.GetStream", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.Stream", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "GetStream", - "fullName": "google.cloud.datastream.v1.Datastream.GetStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_CreateStream_async", - "title": "Datastream createStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a stream.", - "canonical": true, - "file": "datastream.create_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateStream", - "fullName": "google.cloud.datastream.v1.Datastream.CreateStream", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "stream_id", - "type": "TYPE_STRING" - }, - { - "name": "stream", - "type": ".google.cloud.datastream.v1.Stream" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "CreateStream", - "fullName": "google.cloud.datastream.v1.Datastream.CreateStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_UpdateStream_async", - "title": "Datastream updateStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to update the configuration of a stream.", - "canonical": true, - "file": "datastream.update_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateStream", - "fullName": "google.cloud.datastream.v1.Datastream.UpdateStream", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "stream", - "type": ".google.cloud.datastream.v1.Stream" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "UpdateStream", - "fullName": "google.cloud.datastream.v1.Datastream.UpdateStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_DeleteStream_async", - "title": "Datastream deleteStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a stream.", - "canonical": true, - "file": "datastream.delete_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStream", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteStream", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "DeleteStream", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_RunStream_async", - "title": "Datastream runStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to start, resume or recover a stream with a non default CDC strategy.", - "canonical": true, - "file": "datastream.run_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunStream", - "fullName": "google.cloud.datastream.v1.Datastream.RunStream", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "cdc_strategy", - "type": ".google.cloud.datastream.v1.CdcStrategy" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "RunStream", - "fullName": "google.cloud.datastream.v1.Datastream.RunStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_GetStreamObject_async", - "title": "Datastream getStreamObject Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a stream object.", - "canonical": true, - "file": "datastream.get_stream_object.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStreamObject", - "fullName": "google.cloud.datastream.v1.Datastream.GetStreamObject", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.StreamObject", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "GetStreamObject", - "fullName": "google.cloud.datastream.v1.Datastream.GetStreamObject", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_LookupStreamObject_async", - "title": "Datastream lookupStreamObject Sample", - "origin": "API_DEFINITION", - "description": " Use this method to look up a stream object by its source object identifier.", - "canonical": true, - "file": "datastream.lookup_stream_object.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupStreamObject", - "fullName": "google.cloud.datastream.v1.Datastream.LookupStreamObject", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "source_object_identifier", - "type": ".google.cloud.datastream.v1.SourceObjectIdentifier" - } - ], - "resultType": ".google.cloud.datastream.v1.StreamObject", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "LookupStreamObject", - "fullName": "google.cloud.datastream.v1.Datastream.LookupStreamObject", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_ListStreamObjects_async", - "title": "Datastream listStreamObjects Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list the objects of a specific stream.", - "canonical": true, - "file": "datastream.list_stream_objects.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStreamObjects", - "fullName": "google.cloud.datastream.v1.Datastream.ListStreamObjects", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ListStreamObjectsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "ListStreamObjects", - "fullName": "google.cloud.datastream.v1.Datastream.ListStreamObjects", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_StartBackfillJob_async", - "title": "Datastream startBackfillJob Sample", - "origin": "API_DEFINITION", - "description": " Use this method to start a backfill job for the specified stream object.", - "canonical": true, - "file": "datastream.start_backfill_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StartBackfillJob", - "fullName": "google.cloud.datastream.v1.Datastream.StartBackfillJob", - "async": true, - "parameters": [ - { - "name": "object", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.StartBackfillJobResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "StartBackfillJob", - "fullName": "google.cloud.datastream.v1.Datastream.StartBackfillJob", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_StopBackfillJob_async", - "title": "Datastream stopBackfillJob Sample", - "origin": "API_DEFINITION", - "description": " Use this method to stop a backfill job for the specified stream object.", - "canonical": true, - "file": "datastream.stop_backfill_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopBackfillJob", - "fullName": "google.cloud.datastream.v1.Datastream.StopBackfillJob", - "async": true, - "parameters": [ - { - "name": "object", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.StopBackfillJobResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "StopBackfillJob", - "fullName": "google.cloud.datastream.v1.Datastream.StopBackfillJob", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_FetchStaticIps_async", - "title": "Datastream fetchStaticIps Sample", - "origin": "API_DEFINITION", - "description": " The FetchStaticIps API call exposes the static IP addresses used by Datastream.", - "canonical": true, - "file": "datastream.fetch_static_ips.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchStaticIps", - "fullName": "google.cloud.datastream.v1.Datastream.FetchStaticIps", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.FetchStaticIpsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "FetchStaticIps", - "fullName": "google.cloud.datastream.v1.Datastream.FetchStaticIps", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_CreatePrivateConnection_async", - "title": "Datastream createPrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a private connectivity configuration.", - "canonical": true, - "file": "datastream.create_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.CreatePrivateConnection", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "private_connection_id", - "type": "TYPE_STRING" - }, - { - "name": "private_connection", - "type": ".google.cloud.datastream.v1.PrivateConnection" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "CreatePrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.CreatePrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_GetPrivateConnection_async", - "title": "Datastream getPrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a private connectivity configuration.", - "canonical": true, - "file": "datastream.get_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.GetPrivateConnection", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.PrivateConnection", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "GetPrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.GetPrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_ListPrivateConnections_async", - "title": "Datastream listPrivateConnections Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list private connectivity configurations in a project and location.", - "canonical": true, - "file": "datastream.list_private_connections.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPrivateConnections", - "fullName": "google.cloud.datastream.v1.Datastream.ListPrivateConnections", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ListPrivateConnectionsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "ListPrivateConnections", - "fullName": "google.cloud.datastream.v1.Datastream.ListPrivateConnections", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_DeletePrivateConnection_async", - "title": "Datastream deletePrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a private connectivity configuration.", - "canonical": true, - "file": "datastream.delete_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.DeletePrivateConnection", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "DeletePrivateConnection", - "fullName": "google.cloud.datastream.v1.Datastream.DeletePrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_CreateRoute_async", - "title": "Datastream createRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a route for a private connectivity configuration in a project and location.", - "canonical": true, - "file": "datastream.create_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRoute", - "fullName": "google.cloud.datastream.v1.Datastream.CreateRoute", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "route_id", - "type": "TYPE_STRING" - }, - { - "name": "route", - "type": ".google.cloud.datastream.v1.Route" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "CreateRoute", - "fullName": "google.cloud.datastream.v1.Datastream.CreateRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_GetRoute_async", - "title": "Datastream getRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a route.", - "canonical": true, - "file": "datastream.get_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRoute", - "fullName": "google.cloud.datastream.v1.Datastream.GetRoute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.Route", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "GetRoute", - "fullName": "google.cloud.datastream.v1.Datastream.GetRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_ListRoutes_async", - "title": "Datastream listRoutes Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list routes created for a private connectivity configuration in a project and location.", - "canonical": true, - "file": "datastream.list_routes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRoutes", - "fullName": "google.cloud.datastream.v1.Datastream.ListRoutes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1.ListRoutesResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "ListRoutes", - "fullName": "google.cloud.datastream.v1.Datastream.ListRoutes", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1_generated_Datastream_DeleteRoute_async", - "title": "Datastream deleteRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a route.", - "canonical": true, - "file": "datastream.delete_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteRoute", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteRoute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1.DatastreamClient" - }, - "method": { - "shortName": "DeleteRoute", - "fullName": "google.cloud.datastream.v1.Datastream.DeleteRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1.Datastream" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/index.ts b/owl-bot-staging/google-cloud-datastream/v1/src/index.ts deleted file mode 100644 index c76552e9cc1..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/index.ts +++ /dev/null @@ -1,25 +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 -// -// 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 v1 from './v1'; -const DatastreamClient = v1.DatastreamClient; -type DatastreamClient = v1.DatastreamClient; -export {v1, DatastreamClient}; -export default {v1, DatastreamClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client.ts b/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client.ts deleted file mode 100644 index b0d814e6325..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client.ts +++ /dev/null @@ -1,4242 +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 -// -// 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, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/datastream_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './datastream_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Datastream service - * @class - * @memberof v1 - */ -export class DatastreamClient { - 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; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - iamClient: IamClient; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - datastreamStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DatastreamClient. - * - * @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://developers.google.com/identity/protocols/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 DatastreamClient({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 DatastreamClient; - 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 = 'datastream.' + 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); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // 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; - } - this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // 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 = { - connectionProfilePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/connectionProfiles/{connection_profile}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - privateConnectionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/privateConnections/{private_connection}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - routePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}' - ), - streamPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/streams/{stream}' - ), - streamObjectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/streams/{stream}/objects/{object}' - ), - }; - - // 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 = { - listConnectionProfiles: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connectionProfiles'), - listStreams: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'streams'), - listStreamObjects: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'streamObjects'), - fetchStaticIps: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'staticIps'), - listPrivateConnections: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'privateConnections'), - listRoutes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'routes') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectionProfileResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.ConnectionProfile') as gax.protobuf.Type; - const createConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const updateConnectionProfileResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.ConnectionProfile') as gax.protobuf.Type; - const updateConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectionProfileResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const createStreamResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.Stream') as gax.protobuf.Type; - const createStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const updateStreamResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.Stream') as gax.protobuf.Type; - const updateStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const deleteStreamResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const runStreamResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.Stream') as gax.protobuf.Type; - const runStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const createPrivateConnectionResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.PrivateConnection') as gax.protobuf.Type; - const createPrivateConnectionMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const deletePrivateConnectionResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deletePrivateConnectionMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const createRouteResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.Route') as gax.protobuf.Type; - const createRouteMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - const deleteRouteResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteRouteMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectionProfileResponse.decode.bind(createConnectionProfileResponse), - createConnectionProfileMetadata.decode.bind(createConnectionProfileMetadata)), - updateConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectionProfileResponse.decode.bind(updateConnectionProfileResponse), - updateConnectionProfileMetadata.decode.bind(updateConnectionProfileMetadata)), - deleteConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectionProfileResponse.decode.bind(deleteConnectionProfileResponse), - deleteConnectionProfileMetadata.decode.bind(deleteConnectionProfileMetadata)), - createStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createStreamResponse.decode.bind(createStreamResponse), - createStreamMetadata.decode.bind(createStreamMetadata)), - updateStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateStreamResponse.decode.bind(updateStreamResponse), - updateStreamMetadata.decode.bind(updateStreamMetadata)), - deleteStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteStreamResponse.decode.bind(deleteStreamResponse), - deleteStreamMetadata.decode.bind(deleteStreamMetadata)), - runStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - runStreamResponse.decode.bind(runStreamResponse), - runStreamMetadata.decode.bind(runStreamMetadata)), - createPrivateConnection: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createPrivateConnectionResponse.decode.bind(createPrivateConnectionResponse), - createPrivateConnectionMetadata.decode.bind(createPrivateConnectionMetadata)), - deletePrivateConnection: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deletePrivateConnectionResponse.decode.bind(deletePrivateConnectionResponse), - deletePrivateConnectionMetadata.decode.bind(deletePrivateConnectionMetadata)), - createRoute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createRouteResponse.decode.bind(createRouteResponse), - createRouteMetadata.decode.bind(createRouteMetadata)), - deleteRoute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteRouteResponse.decode.bind(deleteRouteResponse), - deleteRouteMetadata.decode.bind(deleteRouteMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datastream.v1.Datastream', 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.datastreamStub) { - return this.datastreamStub; - } - - // Put together the "service stub" for - // google.cloud.datastream.v1.Datastream. - this.datastreamStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.datastream.v1.Datastream') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datastream.v1.Datastream, - 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 datastreamStubMethods = - ['listConnectionProfiles', 'getConnectionProfile', 'createConnectionProfile', 'updateConnectionProfile', 'deleteConnectionProfile', 'discoverConnectionProfile', 'listStreams', 'getStream', 'createStream', 'updateStream', 'deleteStream', 'runStream', 'getStreamObject', 'lookupStreamObject', 'listStreamObjects', 'startBackfillJob', 'stopBackfillJob', 'fetchStaticIps', 'createPrivateConnection', 'getPrivateConnection', 'listPrivateConnections', 'deletePrivateConnection', 'createRoute', 'getRoute', 'listRoutes', 'deleteRoute']; - for (const methodName of datastreamStubMethods) { - const callPromise = this.datastreamStub.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] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.datastreamStub; - } - - /** - * 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 'datastream.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 'datastream.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 -- - // ------------------- -/** - * Use this method to get details about a connection profile. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the connection profile resource to get. - * @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.datastream.v1.ConnectionProfile|ConnectionProfile}. - * 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/v1/datastream.get_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_GetConnectionProfile_async - */ - getConnectionProfile( - request?: protos.google.cloud.datastream.v1.IGetConnectionProfileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|undefined, {}|undefined - ]>; - getConnectionProfile( - request: protos.google.cloud.datastream.v1.IGetConnectionProfileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - getConnectionProfile( - request: protos.google.cloud.datastream.v1.IGetConnectionProfileRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - getConnectionProfile( - request?: protos.google.cloud.datastream.v1.IGetConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IConnectionProfile, - protos.google.cloud.datastream.v1.IGetConnectionProfileRequest|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(); - return this.innerApiCalls.getConnectionProfile(request, options, callback); - } -/** - * Use this method to discover a connection profile. - * The discover API call exposes the data objects and metadata belonging to - * the profile. Typically, a request returns children data objects of a - * parent data object that's optionally supplied in the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the connection profile type. Must be in - * the format `projects/* /locations/*`. - * @param {google.cloud.datastream.v1.ConnectionProfile} request.connectionProfile - * An ad-hoc connection profile configuration. - * @param {string} request.connectionProfileName - * A reference to an existing connection profile. - * @param {boolean} request.fullHierarchy - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - * @param {number} request.hierarchyDepth - * The number of hierarchy levels below the current level to be retrieved. - * @param {google.cloud.datastream.v1.OracleRdbms} request.oracleRdbms - * Oracle RDBMS to enrich with child data objects and metadata. - * @param {google.cloud.datastream.v1.MysqlRdbms} request.mysqlRdbms - * MySQL RDBMS to enrich with child data objects and metadata. - * @param {google.cloud.datastream.v1.PostgresqlRdbms} request.postgresqlRdbms - * PostgreSQL RDBMS to enrich with child data objects and metadata. - * @param {google.cloud.datastream.v1.SqlServerRdbms} request.sqlServerRdbms - * SQLServer RDBMS to enrich with child data objects and metadata. - * @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.datastream.v1.DiscoverConnectionProfileResponse|DiscoverConnectionProfileResponse}. - * 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/v1/datastream.discover_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_DiscoverConnectionProfile_async - */ - discoverConnectionProfile( - request?: protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|undefined, {}|undefined - ]>; - discoverConnectionProfile( - request: protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - discoverConnectionProfile( - request: protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - discoverConnectionProfile( - request?: protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1.IDiscoverConnectionProfileRequest|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(); - return this.innerApiCalls.discoverConnectionProfile(request, options, callback); - } -/** - * Use this method to get details about a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the stream resource to get. - * @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.datastream.v1.Stream|Stream}. - * 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/v1/datastream.get_stream.js - * region_tag:datastream_v1_generated_Datastream_GetStream_async - */ - getStream( - request?: protos.google.cloud.datastream.v1.IGetStreamRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|undefined, {}|undefined - ]>; - getStream( - request: protos.google.cloud.datastream.v1.IGetStreamRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|null|undefined, - {}|null|undefined>): void; - getStream( - request: protos.google.cloud.datastream.v1.IGetStreamRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|null|undefined, - {}|null|undefined>): void; - getStream( - request?: protos.google.cloud.datastream.v1.IGetStreamRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IStream, - protos.google.cloud.datastream.v1.IGetStreamRequest|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(); - return this.innerApiCalls.getStream(request, options, callback); - } -/** - * Use this method to get details about a stream object. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the stream object resource to get. - * @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.datastream.v1.StreamObject|StreamObject}. - * 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/v1/datastream.get_stream_object.js - * region_tag:datastream_v1_generated_Datastream_GetStreamObject_async - */ - getStreamObject( - request?: protos.google.cloud.datastream.v1.IGetStreamObjectRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|undefined, {}|undefined - ]>; - getStreamObject( - request: protos.google.cloud.datastream.v1.IGetStreamObjectRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|null|undefined, - {}|null|undefined>): void; - getStreamObject( - request: protos.google.cloud.datastream.v1.IGetStreamObjectRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|null|undefined, - {}|null|undefined>): void; - getStreamObject( - request?: protos.google.cloud.datastream.v1.IGetStreamObjectRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.IGetStreamObjectRequest|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(); - return this.innerApiCalls.getStreamObject(request, options, callback); - } -/** - * Use this method to look up a stream object by its source object identifier. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent stream that owns the collection of objects. - * @param {google.cloud.datastream.v1.SourceObjectIdentifier} request.sourceObjectIdentifier - * Required. The source object identifier which maps to the stream object. - * @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.datastream.v1.StreamObject|StreamObject}. - * 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/v1/datastream.lookup_stream_object.js - * region_tag:datastream_v1_generated_Datastream_LookupStreamObject_async - */ - lookupStreamObject( - request?: protos.google.cloud.datastream.v1.ILookupStreamObjectRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|undefined, {}|undefined - ]>; - lookupStreamObject( - request: protos.google.cloud.datastream.v1.ILookupStreamObjectRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|null|undefined, - {}|null|undefined>): void; - lookupStreamObject( - request: protos.google.cloud.datastream.v1.ILookupStreamObjectRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|null|undefined, - {}|null|undefined>): void; - lookupStreamObject( - request?: protos.google.cloud.datastream.v1.ILookupStreamObjectRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject, - protos.google.cloud.datastream.v1.ILookupStreamObjectRequest|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(); - return this.innerApiCalls.lookupStreamObject(request, options, callback); - } -/** - * Use this method to start a backfill job for the specified stream object. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.object - * Required. The name of the stream object resource to start a backfill job - * for. - * @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.datastream.v1.StartBackfillJobResponse|StartBackfillJobResponse}. - * 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/v1/datastream.start_backfill_job.js - * region_tag:datastream_v1_generated_Datastream_StartBackfillJob_async - */ - startBackfillJob( - request?: protos.google.cloud.datastream.v1.IStartBackfillJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|undefined, {}|undefined - ]>; - startBackfillJob( - request: protos.google.cloud.datastream.v1.IStartBackfillJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|null|undefined, - {}|null|undefined>): void; - startBackfillJob( - request: protos.google.cloud.datastream.v1.IStartBackfillJobRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|null|undefined, - {}|null|undefined>): void; - startBackfillJob( - request?: protos.google.cloud.datastream.v1.IStartBackfillJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IStartBackfillJobResponse, - protos.google.cloud.datastream.v1.IStartBackfillJobRequest|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({ - 'object': request.object ?? '', - }); - this.initialize(); - return this.innerApiCalls.startBackfillJob(request, options, callback); - } -/** - * Use this method to stop a backfill job for the specified stream object. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.object - * Required. The name of the stream object resource to stop the backfill job - * for. - * @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.datastream.v1.StopBackfillJobResponse|StopBackfillJobResponse}. - * 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/v1/datastream.stop_backfill_job.js - * region_tag:datastream_v1_generated_Datastream_StopBackfillJob_async - */ - stopBackfillJob( - request?: protos.google.cloud.datastream.v1.IStopBackfillJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|undefined, {}|undefined - ]>; - stopBackfillJob( - request: protos.google.cloud.datastream.v1.IStopBackfillJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|null|undefined, - {}|null|undefined>): void; - stopBackfillJob( - request: protos.google.cloud.datastream.v1.IStopBackfillJobRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|null|undefined, - {}|null|undefined>): void; - stopBackfillJob( - request?: protos.google.cloud.datastream.v1.IStopBackfillJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IStopBackfillJobResponse, - protos.google.cloud.datastream.v1.IStopBackfillJobRequest|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({ - 'object': request.object ?? '', - }); - this.initialize(); - return this.innerApiCalls.stopBackfillJob(request, options, callback); - } -/** - * Use this method to get details about a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the private connectivity configuration to get. - * @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.datastream.v1.PrivateConnection|PrivateConnection}. - * 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/v1/datastream.get_private_connection.js - * region_tag:datastream_v1_generated_Datastream_GetPrivateConnection_async - */ - getPrivateConnection( - request?: protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|undefined, {}|undefined - ]>; - getPrivateConnection( - request: protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): void; - getPrivateConnection( - request: protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): void; - getPrivateConnection( - request?: protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IPrivateConnection, - protos.google.cloud.datastream.v1.IGetPrivateConnectionRequest|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(); - return this.innerApiCalls.getPrivateConnection(request, options, callback); - } -/** - * Use this method to get details about a route. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Route resource to get. - * @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.datastream.v1.Route|Route}. - * 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/v1/datastream.get_route.js - * region_tag:datastream_v1_generated_Datastream_GetRoute_async - */ - getRoute( - request?: protos.google.cloud.datastream.v1.IGetRouteRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|undefined, {}|undefined - ]>; - getRoute( - request: protos.google.cloud.datastream.v1.IGetRouteRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|null|undefined, - {}|null|undefined>): void; - getRoute( - request: protos.google.cloud.datastream.v1.IGetRouteRequest, - callback: Callback< - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|null|undefined, - {}|null|undefined>): void; - getRoute( - request?: protos.google.cloud.datastream.v1.IGetRouteRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1.IRoute, - protos.google.cloud.datastream.v1.IGetRouteRequest|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(); - return this.innerApiCalls.getRoute(request, options, callback); - } - -/** - * Use this method to create a connection profile in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of ConnectionProfiles. - * @param {string} request.connectionProfileId - * Required. The connection profile identifier. - * @param {google.cloud.datastream.v1.ConnectionProfile} request.connectionProfile - * Required. The connection profile resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - * @param {boolean} [request.force] - * Optional. Create the connection profile without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_CreateConnectionProfile_async - */ - createConnectionProfile( - request?: protos.google.cloud.datastream.v1.ICreateConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectionProfile( - request: protos.google.cloud.datastream.v1.ICreateConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectionProfile( - request: protos.google.cloud.datastream.v1.ICreateConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectionProfile( - request?: protos.google.cloud.datastream.v1.ICreateConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_CreateConnectionProfile_async - */ - async checkCreateConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to update the parameters of a connection profile. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.datastream.v1.ConnectionProfile} request.connectionProfile - * Required. The connection profile to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - * @param {boolean} [request.force] - * Optional. Update the connection profile without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.update_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_UpdateConnectionProfile_async - */ - updateConnectionProfile( - request?: protos.google.cloud.datastream.v1.IUpdateConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectionProfile( - request: protos.google.cloud.datastream.v1.IUpdateConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectionProfile( - request: protos.google.cloud.datastream.v1.IUpdateConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectionProfile( - request?: protos.google.cloud.datastream.v1.IUpdateConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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({ - 'connection_profile.name': request.connectionProfile!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.update_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_UpdateConnectionProfile_async - */ - async checkUpdateConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a connection profile. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the connection profile resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_DeleteConnectionProfile_async - */ - deleteConnectionProfile( - request?: protos.google.cloud.datastream.v1.IDeleteConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectionProfile( - request: protos.google.cloud.datastream.v1.IDeleteConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectionProfile( - request: protos.google.cloud.datastream.v1.IDeleteConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectionProfile( - request?: protos.google.cloud.datastream.v1.IDeleteConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_connection_profile.js - * region_tag:datastream_v1_generated_Datastream_DeleteConnectionProfile_async - */ - async checkDeleteConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {string} request.streamId - * Required. The stream identifier. - * @param {google.cloud.datastream.v1.Stream} request.stream - * Required. The stream resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - * @param {boolean} [request.force] - * Optional. Create the stream without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_stream.js - * region_tag:datastream_v1_generated_Datastream_CreateStream_async - */ - createStream( - request?: protos.google.cloud.datastream.v1.ICreateStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createStream( - request: protos.google.cloud.datastream.v1.ICreateStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStream( - request: protos.google.cloud.datastream.v1.ICreateStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStream( - request?: protos.google.cloud.datastream.v1.ICreateStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_stream.js - * region_tag:datastream_v1_generated_Datastream_CreateStream_async - */ - async checkCreateStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to update the configuration of a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.datastream.v1.Stream} request.stream - * Required. The stream resource to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - * @param {boolean} [request.force] - * Optional. Update the stream without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.update_stream.js - * region_tag:datastream_v1_generated_Datastream_UpdateStream_async - */ - updateStream( - request?: protos.google.cloud.datastream.v1.IUpdateStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateStream( - request: protos.google.cloud.datastream.v1.IUpdateStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStream( - request: protos.google.cloud.datastream.v1.IUpdateStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStream( - request?: protos.google.cloud.datastream.v1.IUpdateStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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({ - 'stream.name': request.stream!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.update_stream.js - * region_tag:datastream_v1_generated_Datastream_UpdateStream_async - */ - async checkUpdateStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the stream resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_stream.js - * region_tag:datastream_v1_generated_Datastream_DeleteStream_async - */ - deleteStream( - request?: protos.google.cloud.datastream.v1.IDeleteStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteStream( - request: protos.google.cloud.datastream.v1.IDeleteStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStream( - request: protos.google.cloud.datastream.v1.IDeleteStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStream( - request?: protos.google.cloud.datastream.v1.IDeleteStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_stream.js - * region_tag:datastream_v1_generated_Datastream_DeleteStream_async - */ - async checkDeleteStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to start, resume or recover a stream with a non default CDC - * strategy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the stream resource to start, in the format: - * projects/{project_id}/locations/{location}/streams/{stream_name} - * @param {google.cloud.datastream.v1.CdcStrategy} [request.cdcStrategy] - * Optional. The CDC strategy of the stream. If not set, the system's default - * value will be used. - * @param {boolean} [request.force] - * Optional. Update the stream without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.run_stream.js - * region_tag:datastream_v1_generated_Datastream_RunStream_async - */ - runStream( - request?: protos.google.cloud.datastream.v1.IRunStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - runStream( - request: protos.google.cloud.datastream.v1.IRunStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - runStream( - request: protos.google.cloud.datastream.v1.IRunStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - runStream( - request?: protos.google.cloud.datastream.v1.IRunStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.runStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `runStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.run_stream.js - * region_tag:datastream_v1_generated_Datastream_RunStream_async - */ - async checkRunStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.runStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of PrivateConnections. - * @param {string} request.privateConnectionId - * Required. The private connectivity identifier. - * @param {google.cloud.datastream.v1.PrivateConnection} request.privateConnection - * Required. The Private Connectivity resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.force] - * Optional. If set to true, will skip validations. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_private_connection.js - * region_tag:datastream_v1_generated_Datastream_CreatePrivateConnection_async - */ - createPrivateConnection( - request?: protos.google.cloud.datastream.v1.ICreatePrivateConnectionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createPrivateConnection( - request: protos.google.cloud.datastream.v1.ICreatePrivateConnectionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPrivateConnection( - request: protos.google.cloud.datastream.v1.ICreatePrivateConnectionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPrivateConnection( - request?: protos.google.cloud.datastream.v1.ICreatePrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createPrivateConnection(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createPrivateConnection()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_private_connection.js - * region_tag:datastream_v1_generated_Datastream_CreatePrivateConnection_async - */ - async checkCreatePrivateConnectionProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createPrivateConnection, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the private connectivity configuration to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.force] - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_private_connection.js - * region_tag:datastream_v1_generated_Datastream_DeletePrivateConnection_async - */ - deletePrivateConnection( - request?: protos.google.cloud.datastream.v1.IDeletePrivateConnectionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deletePrivateConnection( - request: protos.google.cloud.datastream.v1.IDeletePrivateConnectionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePrivateConnection( - request: protos.google.cloud.datastream.v1.IDeletePrivateConnectionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePrivateConnection( - request?: protos.google.cloud.datastream.v1.IDeletePrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deletePrivateConnection(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deletePrivateConnection()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_private_connection.js - * region_tag:datastream_v1_generated_Datastream_DeletePrivateConnection_async - */ - async checkDeletePrivateConnectionProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePrivateConnection, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a route for a private connectivity configuration - * in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routes. - * @param {string} request.routeId - * Required. The Route identifier. - * @param {google.cloud.datastream.v1.Route} request.route - * Required. The Route resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_route.js - * region_tag:datastream_v1_generated_Datastream_CreateRoute_async - */ - createRoute( - request?: protos.google.cloud.datastream.v1.ICreateRouteRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRoute( - request: protos.google.cloud.datastream.v1.ICreateRouteRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRoute( - request: protos.google.cloud.datastream.v1.ICreateRouteRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRoute( - request?: protos.google.cloud.datastream.v1.ICreateRouteRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createRoute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createRoute()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.create_route.js - * region_tag:datastream_v1_generated_Datastream_CreateRoute_async - */ - async checkCreateRouteProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRoute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a route. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Route resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_route.js - * region_tag:datastream_v1_generated_Datastream_DeleteRoute_async - */ - deleteRoute( - request?: protos.google.cloud.datastream.v1.IDeleteRouteRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteRoute( - request: protos.google.cloud.datastream.v1.IDeleteRouteRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRoute( - request: protos.google.cloud.datastream.v1.IDeleteRouteRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRoute( - request?: protos.google.cloud.datastream.v1.IDeleteRouteRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteRoute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteRoute()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/datastream.delete_route.js - * region_tag:datastream_v1_generated_Datastream_DeleteRoute_async - */ - async checkDeleteRouteProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRoute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Use this method to list connection profiles created in a project and - * location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.ConnectionProfile|ConnectionProfile}. - * 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 `listConnectionProfilesAsync()` - * 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. - */ - listConnectionProfiles( - request?: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IConnectionProfile[], - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest|null, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse - ]>; - listConnectionProfiles( - request: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1.IConnectionProfile>): void; - listConnectionProfiles( - request: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1.IConnectionProfile>): void; - listConnectionProfiles( - request?: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1.IConnectionProfile>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1.IConnectionProfile>): - Promise<[ - protos.google.cloud.datastream.v1.IConnectionProfile[], - protos.google.cloud.datastream.v1.IListConnectionProfilesRequest|null, - protos.google.cloud.datastream.v1.IListConnectionProfilesResponse - ]>|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(); - return this.innerApiCalls.listConnectionProfiles(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.ConnectionProfile|ConnectionProfile} 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 `listConnectionProfilesAsync()` - * 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. - */ - listConnectionProfilesStream( - request?: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - 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['listConnectionProfiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectionProfiles.createStream( - this.innerApiCalls.listConnectionProfiles as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectionProfiles`, 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 parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.ConnectionProfile|ConnectionProfile}. 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/v1/datastream.list_connection_profiles.js - * region_tag:datastream_v1_generated_Datastream_ListConnectionProfiles_async - */ - listConnectionProfilesAsync( - request?: protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, - 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['listConnectionProfiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectionProfiles.asyncIterate( - this.innerApiCalls['listConnectionProfiles'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list streams in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Stream|Stream}. - * 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 `listStreamsAsync()` - * 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. - */ - listStreams( - request?: protos.google.cloud.datastream.v1.IListStreamsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStream[], - protos.google.cloud.datastream.v1.IListStreamsRequest|null, - protos.google.cloud.datastream.v1.IListStreamsResponse - ]>; - listStreams( - request: protos.google.cloud.datastream.v1.IListStreamsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamsRequest, - protos.google.cloud.datastream.v1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStream>): void; - listStreams( - request: protos.google.cloud.datastream.v1.IListStreamsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamsRequest, - protos.google.cloud.datastream.v1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStream>): void; - listStreams( - request?: protos.google.cloud.datastream.v1.IListStreamsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamsRequest, - protos.google.cloud.datastream.v1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStream>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamsRequest, - protos.google.cloud.datastream.v1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStream>): - Promise<[ - protos.google.cloud.datastream.v1.IStream[], - protos.google.cloud.datastream.v1.IListStreamsRequest|null, - protos.google.cloud.datastream.v1.IListStreamsResponse - ]>|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(); - return this.innerApiCalls.listStreams(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Stream|Stream} 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 `listStreamsAsync()` - * 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. - */ - listStreamsStream( - request?: protos.google.cloud.datastream.v1.IListStreamsRequest, - 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['listStreams']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreams.createStream( - this.innerApiCalls.listStreams as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listStreams`, 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 parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Stream|Stream}. 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/v1/datastream.list_streams.js - * region_tag:datastream_v1_generated_Datastream_ListStreams_async - */ - listStreamsAsync( - request?: protos.google.cloud.datastream.v1.IListStreamsRequest, - 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['listStreams']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreams.asyncIterate( - this.innerApiCalls['listStreams'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list the objects of a specific stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent stream that owns the collection of objects. - * @param {number} request.pageSize - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` 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.datastream.v1.StreamObject|StreamObject}. - * 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 `listStreamObjectsAsync()` - * 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. - */ - listStreamObjects( - request?: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject[], - protos.google.cloud.datastream.v1.IListStreamObjectsRequest|null, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse - ]>; - listStreamObjects( - request: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStreamObject>): void; - listStreamObjects( - request: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStreamObject>): void; - listStreamObjects( - request?: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStreamObject>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse|null|undefined, - protos.google.cloud.datastream.v1.IStreamObject>): - Promise<[ - protos.google.cloud.datastream.v1.IStreamObject[], - protos.google.cloud.datastream.v1.IListStreamObjectsRequest|null, - protos.google.cloud.datastream.v1.IListStreamObjectsResponse - ]>|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(); - return this.innerApiCalls.listStreamObjects(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent stream that owns the collection of objects. - * @param {number} request.pageSize - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` 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.datastream.v1.StreamObject|StreamObject} 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 `listStreamObjectsAsync()` - * 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. - */ - listStreamObjectsStream( - request?: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - 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['listStreamObjects']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreamObjects.createStream( - this.innerApiCalls.listStreamObjects as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listStreamObjects`, 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 parent stream that owns the collection of objects. - * @param {number} request.pageSize - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` 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.datastream.v1.StreamObject|StreamObject}. 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/v1/datastream.list_stream_objects.js - * region_tag:datastream_v1_generated_Datastream_ListStreamObjects_async - */ - listStreamObjectsAsync( - request?: protos.google.cloud.datastream.v1.IListStreamObjectsRequest, - 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['listStreamObjects']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreamObjects.asyncIterate( - this.innerApiCalls['listStreamObjects'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * The FetchStaticIps API call exposes the static IP addresses used by - * Datastream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 string. - * 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 `fetchStaticIpsAsync()` - * 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. - */ - fetchStaticIps( - request?: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - options?: CallOptions): - Promise<[ - string[], - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest|null, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse - ]>; - fetchStaticIps( - request: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse|null|undefined, - string>): void; - fetchStaticIps( - request: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse|null|undefined, - string>): void; - fetchStaticIps( - request?: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse|null|undefined, - string>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse|null|undefined, - string>): - Promise<[ - string[], - protos.google.cloud.datastream.v1.IFetchStaticIpsRequest|null, - protos.google.cloud.datastream.v1.IFetchStaticIpsResponse - ]>|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(); - return this.innerApiCalls.fetchStaticIps(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 string 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 `fetchStaticIpsAsync()` - * 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. - */ - fetchStaticIpsStream( - request?: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['fetchStaticIps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchStaticIps.createStream( - this.innerApiCalls.fetchStaticIps as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `fetchStaticIps`, 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.name - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 - * string. 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/v1/datastream.fetch_static_ips.js - * region_tag:datastream_v1_generated_Datastream_FetchStaticIps_async - */ - fetchStaticIpsAsync( - request?: protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['fetchStaticIps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchStaticIps.asyncIterate( - this.innerApiCalls['fetchStaticIps'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list private connectivity configurations in a project - * and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity - * configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.PrivateConnection|PrivateConnection}. - * 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 `listPrivateConnectionsAsync()` - * 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. - */ - listPrivateConnections( - request?: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IPrivateConnection[], - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest|null, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse - ]>; - listPrivateConnections( - request: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1.IPrivateConnection>): void; - listPrivateConnections( - request: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1.IPrivateConnection>): void; - listPrivateConnections( - request?: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1.IPrivateConnection>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1.IPrivateConnection>): - Promise<[ - protos.google.cloud.datastream.v1.IPrivateConnection[], - protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest|null, - protos.google.cloud.datastream.v1.IListPrivateConnectionsResponse - ]>|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(); - return this.innerApiCalls.listPrivateConnections(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity - * configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.PrivateConnection|PrivateConnection} 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 `listPrivateConnectionsAsync()` - * 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. - */ - listPrivateConnectionsStream( - request?: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - 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['listPrivateConnections']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPrivateConnections.createStream( - this.innerApiCalls.listPrivateConnections as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPrivateConnections`, 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 parent that owns the collection of private connectivity - * configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.PrivateConnection|PrivateConnection}. 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/v1/datastream.list_private_connections.js - * region_tag:datastream_v1_generated_Datastream_ListPrivateConnections_async - */ - listPrivateConnectionsAsync( - request?: protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, - 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['listPrivateConnections']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPrivateConnections.asyncIterate( - this.innerApiCalls['listPrivateConnections'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list routes created for a private connectivity - * configuration in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Route|Route}. - * 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 `listRoutesAsync()` - * 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. - */ - listRoutes( - request?: protos.google.cloud.datastream.v1.IListRoutesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1.IRoute[], - protos.google.cloud.datastream.v1.IListRoutesRequest|null, - protos.google.cloud.datastream.v1.IListRoutesResponse - ]>; - listRoutes( - request: protos.google.cloud.datastream.v1.IListRoutesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListRoutesRequest, - protos.google.cloud.datastream.v1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1.IRoute>): void; - listRoutes( - request: protos.google.cloud.datastream.v1.IListRoutesRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1.IListRoutesRequest, - protos.google.cloud.datastream.v1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1.IRoute>): void; - listRoutes( - request?: protos.google.cloud.datastream.v1.IListRoutesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1.IListRoutesRequest, - protos.google.cloud.datastream.v1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1.IRoute>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1.IListRoutesRequest, - protos.google.cloud.datastream.v1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1.IRoute>): - Promise<[ - protos.google.cloud.datastream.v1.IRoute[], - protos.google.cloud.datastream.v1.IListRoutesRequest|null, - protos.google.cloud.datastream.v1.IListRoutesResponse - ]>|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(); - return this.innerApiCalls.listRoutes(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Route|Route} 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 `listRoutesAsync()` - * 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. - */ - listRoutesStream( - request?: protos.google.cloud.datastream.v1.IListRoutesRequest, - 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['listRoutes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRoutes.createStream( - this.innerApiCalls.listRoutes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRoutes`, 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 parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1.Route|Route}. 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/v1/datastream.list_routes.js - * region_tag:datastream_v1_generated_Datastream_ListRoutes_async - */ - listRoutesAsync( - request?: protos.google.cloud.datastream.v1.IListRoutesRequest, - 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['listRoutes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRoutes.asyncIterate( - this.innerApiCalls['listRoutes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.getIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - setIamPolicy( - request: IamProtos.google.iam.v1.SetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.setIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - */ - testIamPermissions( - request: IamProtos.google.iam.v1.TestIamPermissionsRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { - return this.iamClient.testIamPermissions(request, options, callback); - } - -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @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 google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. 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.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list 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 google.cloud.location.Location | Location}. 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 - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified connectionProfile resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} connection_profile - * @returns {string} Resource name string. - */ - connectionProfilePath(project:string,location:string,connectionProfile:string) { - return this.pathTemplates.connectionProfilePathTemplate.render({ - project: project, - location: location, - connection_profile: connectionProfile, - }); - } - - /** - * Parse the project from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).project; - } - - /** - * Parse the location from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the location. - */ - matchLocationFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).location; - } - - /** - * Parse the connection_profile from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the connection_profile. - */ - matchConnectionProfileFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).connection_profile; - } - - /** - * 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 privateConnection resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} private_connection - * @returns {string} Resource name string. - */ - privateConnectionPath(project:string,location:string,privateConnection:string) { - return this.pathTemplates.privateConnectionPathTemplate.render({ - project: project, - location: location, - private_connection: privateConnection, - }); - } - - /** - * Parse the project from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).project; - } - - /** - * Parse the location from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).location; - } - - /** - * Parse the private_connection from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the private_connection. - */ - matchPrivateConnectionFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).private_connection; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified route resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} private_connection - * @param {string} route - * @returns {string} Resource name string. - */ - routePath(project:string,location:string,privateConnection:string,route:string) { - return this.pathTemplates.routePathTemplate.render({ - project: project, - location: location, - private_connection: privateConnection, - route: route, - }); - } - - /** - * Parse the project from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).project; - } - - /** - * Parse the location from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).location; - } - - /** - * Parse the private_connection from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the private_connection. - */ - matchPrivateConnectionFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).private_connection; - } - - /** - * Parse the route from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the route. - */ - matchRouteFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).route; - } - - /** - * Return a fully-qualified stream resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} stream - * @returns {string} Resource name string. - */ - streamPath(project:string,location:string,stream:string) { - return this.pathTemplates.streamPathTemplate.render({ - project: project, - location: location, - stream: stream, - }); - } - - /** - * Parse the project from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the project. - */ - matchProjectFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).project; - } - - /** - * Parse the location from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the location. - */ - matchLocationFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).location; - } - - /** - * Parse the stream from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the stream. - */ - matchStreamFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).stream; - } - - /** - * Return a fully-qualified streamObject resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} stream - * @param {string} object - * @returns {string} Resource name string. - */ - streamObjectPath(project:string,location:string,stream:string,object:string) { - return this.pathTemplates.streamObjectPathTemplate.render({ - project: project, - location: location, - stream: stream, - object: object, - }); - } - - /** - * Parse the project from StreamObject resource. - * - * @param {string} streamObjectName - * A fully-qualified path representing StreamObject resource. - * @returns {string} A string representing the project. - */ - matchProjectFromStreamObjectName(streamObjectName: string) { - return this.pathTemplates.streamObjectPathTemplate.match(streamObjectName).project; - } - - /** - * Parse the location from StreamObject resource. - * - * @param {string} streamObjectName - * A fully-qualified path representing StreamObject resource. - * @returns {string} A string representing the location. - */ - matchLocationFromStreamObjectName(streamObjectName: string) { - return this.pathTemplates.streamObjectPathTemplate.match(streamObjectName).location; - } - - /** - * Parse the stream from StreamObject resource. - * - * @param {string} streamObjectName - * A fully-qualified path representing StreamObject resource. - * @returns {string} A string representing the stream. - */ - matchStreamFromStreamObjectName(streamObjectName: string) { - return this.pathTemplates.streamObjectPathTemplate.match(streamObjectName).stream; - } - - /** - * Parse the object from StreamObject resource. - * - * @param {string} streamObjectName - * A fully-qualified path representing StreamObject resource. - * @returns {string} A string representing the object. - */ - matchObjectFromStreamObjectName(streamObjectName: string) { - return this.pathTemplates.streamObjectPathTemplate.match(streamObjectName).object; - } - - /** - * 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.datastreamStub && !this._terminated) { - return this.datastreamStub.then(stub => { - this._terminated = true; - stub.close(); - this.iamClient.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client_config.json b/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client_config.json deleted file mode 100644 index e1b7f69983b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_client_config.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "interfaces": { - "google.cloud.datastream.v1.Datastream": { - "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": { - "ListConnectionProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DiscoverConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListStreams": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetStream": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RunStream": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetStreamObject": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "LookupStreamObject": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListStreamObjects": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "StartBackfillJob": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "StopBackfillJob": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchStaticIps": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreatePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListPrivateConnections": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeletePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateRoute": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetRoute": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteRoute": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_proto_list.json b/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_proto_list.json deleted file mode 100644 index 43d04578f4a..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/v1/datastream_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/cloud/datastream/v1/datastream.proto", - "../../protos/google/cloud/datastream/v1/datastream_resources.proto" -] diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-datastream/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 4f455fb0d4e..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.datastream.v1", - "libraryPackage": "@google-cloud/datastream", - "services": { - "Datastream": { - "clients": { - "grpc": { - "libraryClient": "DatastreamClient", - "rpcs": { - "GetConnectionProfile": { - "methods": [ - "getConnectionProfile" - ] - }, - "DiscoverConnectionProfile": { - "methods": [ - "discoverConnectionProfile" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetStreamObject": { - "methods": [ - "getStreamObject" - ] - }, - "LookupStreamObject": { - "methods": [ - "lookupStreamObject" - ] - }, - "StartBackfillJob": { - "methods": [ - "startBackfillJob" - ] - }, - "StopBackfillJob": { - "methods": [ - "stopBackfillJob" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "CreateConnectionProfile": { - "methods": [ - "createConnectionProfile" - ] - }, - "UpdateConnectionProfile": { - "methods": [ - "updateConnectionProfile" - ] - }, - "DeleteConnectionProfile": { - "methods": [ - "deleteConnectionProfile" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "RunStream": { - "methods": [ - "runStream" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "CreateRoute": { - "methods": [ - "createRoute" - ] - }, - "DeleteRoute": { - "methods": [ - "deleteRoute" - ] - }, - "ListConnectionProfiles": { - "methods": [ - "listConnectionProfiles", - "listConnectionProfilesStream", - "listConnectionProfilesAsync" - ] - }, - "ListStreams": { - "methods": [ - "listStreams", - "listStreamsStream", - "listStreamsAsync" - ] - }, - "ListStreamObjects": { - "methods": [ - "listStreamObjects", - "listStreamObjectsStream", - "listStreamObjectsAsync" - ] - }, - "FetchStaticIps": { - "methods": [ - "fetchStaticIps", - "fetchStaticIpsStream", - "fetchStaticIpsAsync" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections", - "listPrivateConnectionsStream", - "listPrivateConnectionsAsync" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes", - "listRoutesStream", - "listRoutesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DatastreamClient", - "rpcs": { - "GetConnectionProfile": { - "methods": [ - "getConnectionProfile" - ] - }, - "DiscoverConnectionProfile": { - "methods": [ - "discoverConnectionProfile" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetStreamObject": { - "methods": [ - "getStreamObject" - ] - }, - "LookupStreamObject": { - "methods": [ - "lookupStreamObject" - ] - }, - "StartBackfillJob": { - "methods": [ - "startBackfillJob" - ] - }, - "StopBackfillJob": { - "methods": [ - "stopBackfillJob" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "CreateConnectionProfile": { - "methods": [ - "createConnectionProfile" - ] - }, - "UpdateConnectionProfile": { - "methods": [ - "updateConnectionProfile" - ] - }, - "DeleteConnectionProfile": { - "methods": [ - "deleteConnectionProfile" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "RunStream": { - "methods": [ - "runStream" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "CreateRoute": { - "methods": [ - "createRoute" - ] - }, - "DeleteRoute": { - "methods": [ - "deleteRoute" - ] - }, - "ListConnectionProfiles": { - "methods": [ - "listConnectionProfiles", - "listConnectionProfilesStream", - "listConnectionProfilesAsync" - ] - }, - "ListStreams": { - "methods": [ - "listStreams", - "listStreamsStream", - "listStreamsAsync" - ] - }, - "ListStreamObjects": { - "methods": [ - "listStreamObjects", - "listStreamObjectsStream", - "listStreamObjectsAsync" - ] - }, - "FetchStaticIps": { - "methods": [ - "fetchStaticIps", - "fetchStaticIpsStream", - "fetchStaticIpsAsync" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections", - "listPrivateConnectionsStream", - "listPrivateConnectionsAsync" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes", - "listRoutesStream", - "listRoutesAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-datastream/v1/src/v1/index.ts deleted file mode 100644 index 46c2221abd2..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +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 -// -// 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 {DatastreamClient} from './datastream_client'; diff --git a/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 10cbd8ef19c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +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 -// -// 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 datastream = require('@google-cloud/datastream'); - -function main() { - const datastreamClient = new datastream.DatastreamClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 903b18b06d6..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +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 -// -// 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 {DatastreamClient} from '@google-cloud/datastream'; - -// check that the client class type name can be used -function doStuffWithDatastreamClient(client: DatastreamClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const datastreamClient = new DatastreamClient(); - doStuffWithDatastreamClient(datastreamClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-datastream/v1/system-test/install.ts b/owl-bot-staging/google-cloud-datastream/v1/system-test/install.ts deleted file mode 100644 index 2a505d6df0c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/system-test/install.ts +++ /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 -// -// 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', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1/test/gapic_datastream_v1.ts b/owl-bot-staging/google-cloud-datastream/v1/test/gapic_datastream_v1.ts deleted file mode 100644 index 84687600bf5..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/test/gapic_datastream_v1.ts +++ /dev/null @@ -1,5419 +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 -// -// 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 datastreamModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} 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 stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -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('v1.DatastreamClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datastreamModule.v1.DatastreamClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datastream.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datastreamModule.v1.DatastreamClient(); - 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 = datastreamModule.v1.DatastreamClient.servicePath; - assert.strictEqual(servicePath, 'datastream.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datastreamModule.v1.DatastreamClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datastream.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datastreamModule.v1.DatastreamClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datastreamModule.v1.DatastreamClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1.DatastreamClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1.DatastreamClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1.DatastreamClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = datastreamModule.v1.DatastreamClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datastreamModule.v1.DatastreamClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datastreamModule.v1.DatastreamClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.datastreamStub, undefined); - await client.initialize(); - assert(client.datastreamStub); - }); - - it('has close method for the initialized client', done => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.datastreamStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.datastreamStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datastreamModule.v1.DatastreamClient({ - 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 datastreamModule.v1.DatastreamClient({ - 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('getConnectionProfile', () => { - it('invokes getConnectionProfile without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.ConnectionProfile() - ); - client.innerApiCalls.getConnectionProfile = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectionProfile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.ConnectionProfile() - ); - client.innerApiCalls.getConnectionProfile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectionProfile( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IConnectionProfile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectionProfile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectionProfile(request), expectedError); - }); - }); - - describe('discoverConnectionProfile', () => { - it('invokes discoverConnectionProfile without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileResponse() - ); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCall(expectedResponse); - const [response] = await client.discoverConnectionProfile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileResponse() - ); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.discoverConnectionProfile( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IDiscoverConnectionProfileResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.discoverConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.discoverConnectionProfile(request), expectedError); - }); - }); - - describe('getStream', () => { - it('invokes getStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.Stream() - ); - client.innerApiCalls.getStream = stubSimpleCall(expectedResponse); - const [response] = await client.getStream(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.Stream() - ); - client.innerApiCalls.getStream = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getStream( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStream|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getStream = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getStream(request), expectedError); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getStream(request), expectedError); - }); - }); - - describe('getStreamObject', () => { - it('invokes getStreamObject without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamObjectRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StreamObject() - ); - client.innerApiCalls.getStreamObject = stubSimpleCall(expectedResponse); - const [response] = await client.getStreamObject(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStreamObject without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamObjectRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StreamObject() - ); - client.innerApiCalls.getStreamObject = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getStreamObject( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStreamObject|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStreamObject with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamObjectRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getStreamObject = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getStreamObject(request), expectedError); - const actualRequest = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStreamObject with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetStreamObjectRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getStreamObject(request), expectedError); - }); - }); - - describe('lookupStreamObject', () => { - it('invokes lookupStreamObject without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.LookupStreamObjectRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StreamObject() - ); - client.innerApiCalls.lookupStreamObject = stubSimpleCall(expectedResponse); - const [response] = await client.lookupStreamObject(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupStreamObject without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.LookupStreamObjectRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StreamObject() - ); - client.innerApiCalls.lookupStreamObject = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lookupStreamObject( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStreamObject|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupStreamObject with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.LookupStreamObjectRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.lookupStreamObject = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.lookupStreamObject(request), expectedError); - const actualRequest = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupStreamObject as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupStreamObject with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.LookupStreamObjectRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.lookupStreamObject(request), expectedError); - }); - }); - - describe('startBackfillJob', () => { - it('invokes startBackfillJob without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StartBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobResponse() - ); - client.innerApiCalls.startBackfillJob = stubSimpleCall(expectedResponse); - const [response] = await client.startBackfillJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startBackfillJob without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StartBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobResponse() - ); - client.innerApiCalls.startBackfillJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startBackfillJob( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStartBackfillJobResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startBackfillJob with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StartBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.startBackfillJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.startBackfillJob(request), expectedError); - const actualRequest = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startBackfillJob with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StartBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StartBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.startBackfillJob(request), expectedError); - }); - }); - - describe('stopBackfillJob', () => { - it('invokes stopBackfillJob without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StopBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobResponse() - ); - client.innerApiCalls.stopBackfillJob = stubSimpleCall(expectedResponse); - const [response] = await client.stopBackfillJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopBackfillJob without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StopBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobResponse() - ); - client.innerApiCalls.stopBackfillJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.stopBackfillJob( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStopBackfillJobResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopBackfillJob with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StopBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedHeaderRequestParams = `object=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.stopBackfillJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.stopBackfillJob(request), expectedError); - const actualRequest = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopBackfillJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopBackfillJob with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.StopBackfillJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.StopBackfillJobRequest', ['object']); - request.object = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.stopBackfillJob(request), expectedError); - }); - }); - - describe('getPrivateConnection', () => { - it('invokes getPrivateConnection without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.PrivateConnection() - ); - client.innerApiCalls.getPrivateConnection = stubSimpleCall(expectedResponse); - const [response] = await client.getPrivateConnection(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.PrivateConnection() - ); - client.innerApiCalls.getPrivateConnection = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPrivateConnection( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IPrivateConnection|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPrivateConnection = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPrivateConnection(request), expectedError); - }); - }); - - describe('getRoute', () => { - it('invokes getRoute without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.Route() - ); - client.innerApiCalls.getRoute = stubSimpleCall(expectedResponse); - const [response] = await client.getRoute(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1.Route() - ); - client.innerApiCalls.getRoute = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRoute( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IRoute|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRoute = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute with closed client', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getRoute(request), expectedError); - }); - }); - - describe('createConnectionProfile', () => { - it('invokes createConnectionProfile without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectionProfile', () => { - it('invokes updateConnectionProfile without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectionProfile', () => { - it('invokes deleteConnectionProfile without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createStream', () => { - it('invokes createStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.createStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createStream(request), expectedError); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateStreamProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateStreamProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateStream', () => { - it('invokes updateStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateStream(request), expectedError); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateStreamProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateStreamProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteStream', () => { - it('invokes deleteStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteStream(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteStreamProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteStreamProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('runStream', () => { - it('invokes runStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.RunStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.RunStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.runStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.runStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runStream without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.RunStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.RunStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.runStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runStream with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.RunStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.RunStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.runStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.runStream(request), expectedError); - const actualRequest = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runStream with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.RunStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.RunStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.runStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.runStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRunStreamProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRunStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRunStreamProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkRunStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createPrivateConnection', () => { - it('invokes createPrivateConnection without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(expectedResponse); - const [operation] = await client.createPrivateConnection(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPrivateConnection = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPrivateConnection( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createPrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createPrivateConnection(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreatePrivateConnectionProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreatePrivateConnectionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreatePrivateConnectionProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreatePrivateConnectionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deletePrivateConnection', () => { - it('invokes deletePrivateConnection without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(expectedResponse); - const [operation] = await client.deletePrivateConnection(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePrivateConnection( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deletePrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deletePrivateConnection(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeletePrivateConnectionProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeletePrivateConnectionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeletePrivateConnectionProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeletePrivateConnectionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRoute', () => { - it('invokes createRoute without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRoute = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRoute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRoute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRoute( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRoute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRoute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRoute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateRouteProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateRouteProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateRouteProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateRouteProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteRoute', () => { - it('invokes deleteRoute without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRoute = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteRoute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRoute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteRoute( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute with call error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRoute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute with LRO error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRoute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteRoute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteRouteProgress without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteRouteProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteRouteProgress with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteRouteProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectionProfiles', () => { - it('invokes listConnectionProfiles without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - ]; - client.innerApiCalls.listConnectionProfiles = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectionProfiles(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfiles without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - ]; - client.innerApiCalls.listConnectionProfiles = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectionProfiles( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IConnectionProfile[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfiles with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectionProfiles = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectionProfiles(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfilesStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - ]; - client.descriptors.page.listConnectionProfiles.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectionProfilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.ConnectionProfile[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.ConnectionProfile) => { - 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.listConnectionProfiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectionProfiles, request)); - assert( - (client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectionProfilesStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectionProfilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.ConnectionProfile[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.ConnectionProfile) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectionProfiles, request)); - assert( - (client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectionProfiles without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1.ConnectionProfile()), - ]; - client.descriptors.page.listConnectionProfiles.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1.IConnectionProfile[] = []; - const iterable = client.listConnectionProfilesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectionProfiles with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectionProfilesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1.IConnectionProfile[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listStreams', () => { - it('invokes listStreams without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - ]; - client.innerApiCalls.listStreams = stubSimpleCall(expectedResponse); - const [response] = await client.listStreams(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreams without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - ]; - client.innerApiCalls.listStreams = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listStreams( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStream[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreams with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listStreams = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listStreams(request), expectedError); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreamsStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - ]; - client.descriptors.page.listStreams.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listStreamsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.Stream[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.Stream) => { - 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.listStreams.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreams, request)); - assert( - (client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listStreamsStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreams.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listStreamsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.Stream[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.Stream) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreams, request)); - assert( - (client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreams without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Stream()), - ]; - client.descriptors.page.listStreams.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1.IStream[] = []; - const iterable = client.listStreamsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreams with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreams.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listStreamsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1.IStream[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listStreamObjects', () => { - it('invokes listStreamObjects without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - ]; - client.innerApiCalls.listStreamObjects = stubSimpleCall(expectedResponse); - const [response] = await client.listStreamObjects(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreamObjects without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - ]; - client.innerApiCalls.listStreamObjects = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listStreamObjects( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IStreamObject[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreamObjects with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listStreamObjects = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listStreamObjects(request), expectedError); - const actualRequest = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreamObjects as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreamObjectsStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - ]; - client.descriptors.page.listStreamObjects.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listStreamObjectsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.StreamObject[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.StreamObject) => { - 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.listStreamObjects.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreamObjects, request)); - assert( - (client.descriptors.page.listStreamObjects.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listStreamObjectsStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreamObjects.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listStreamObjectsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.StreamObject[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.StreamObject) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listStreamObjects.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreamObjects, request)); - assert( - (client.descriptors.page.listStreamObjects.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreamObjects without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - generateSampleMessage(new protos.google.cloud.datastream.v1.StreamObject()), - ]; - client.descriptors.page.listStreamObjects.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1.IStreamObject[] = []; - const iterable = client.listStreamObjectsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listStreamObjects.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreamObjects.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreamObjects with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListStreamObjectsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreamObjects.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listStreamObjectsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1.IStreamObject[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listStreamObjects.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreamObjects.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('fetchStaticIps', () => { - it('invokes fetchStaticIps without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [new String(), new String(), new String()]; - client.innerApiCalls.fetchStaticIps = stubSimpleCall(expectedResponse); - const [response] = await client.fetchStaticIps(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIps without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [new String(), new String(), new String()]; - client.innerApiCalls.fetchStaticIps = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchStaticIps( - request, - (err?: Error|null, result?: string[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIps with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchStaticIps = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchStaticIps(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIpsStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.fetchStaticIps.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.fetchStaticIpsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: string[] = []; - stream.on('data', (response: string) => { - 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.fetchStaticIps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchStaticIps, request)); - assert( - (client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes fetchStaticIpsStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchStaticIps.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.fetchStaticIpsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: string[] = []; - stream.on('data', (response: string) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchStaticIps, request)); - assert( - (client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchStaticIps without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.fetchStaticIps.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: string[] = []; - const iterable = client.fetchStaticIpsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchStaticIps with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchStaticIps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.fetchStaticIpsAsync(request); - await assert.rejects(async () => { - const responses: string[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPrivateConnections', () => { - it('invokes listPrivateConnections without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - ]; - client.innerApiCalls.listPrivateConnections = stubSimpleCall(expectedResponse); - const [response] = await client.listPrivateConnections(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnections without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - ]; - client.innerApiCalls.listPrivateConnections = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPrivateConnections( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IPrivateConnection[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnections with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPrivateConnections = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPrivateConnections(request), expectedError); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnectionsStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - ]; - client.descriptors.page.listPrivateConnections.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPrivateConnectionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.PrivateConnection[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.PrivateConnection) => { - 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.listPrivateConnections.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPrivateConnections, request)); - assert( - (client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPrivateConnectionsStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPrivateConnections.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPrivateConnectionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.PrivateConnection[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.PrivateConnection) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPrivateConnections, request)); - assert( - (client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPrivateConnections without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1.PrivateConnection()), - ]; - client.descriptors.page.listPrivateConnections.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1.IPrivateConnection[] = []; - const iterable = client.listPrivateConnectionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPrivateConnections with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPrivateConnections.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPrivateConnectionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1.IPrivateConnection[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRoutes', () => { - it('invokes listRoutes without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - ]; - client.innerApiCalls.listRoutes = stubSimpleCall(expectedResponse); - const [response] = await client.listRoutes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutes without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - ]; - client.innerApiCalls.listRoutes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRoutes( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1.IRoute[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutes with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRoutes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRoutes(request), expectedError); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutesStream without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - ]; - client.descriptors.page.listRoutes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRoutesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.Route[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.Route) => { - 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.listRoutes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRoutes, request)); - assert( - (client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRoutesStream with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRoutes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRoutesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1.Route[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1.Route) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRoutes, request)); - assert( - (client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRoutes without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1.Route()), - ]; - client.descriptors.page.listRoutes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1.IRoute[] = []; - const iterable = client.listRoutesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRoutes with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRoutes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRoutesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1.IRoute[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes getIamPolicy with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.setIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes setIamPolicy with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); - const response = await client.testIamPermissions(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0)); - }); - it('invokes testIamPermissions with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('connectionProfile', () => { - const fakePath = "/rendered/path/connectionProfile"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - connection_profile: "connectionProfileValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectionProfilePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectionProfilePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectionProfilePath', () => { - const result = client.connectionProfilePath("projectValue", "locationValue", "connectionProfileValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectionProfilePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectionProfileName', () => { - const result = client.matchProjectFromConnectionProfileName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromConnectionProfileName', () => { - const result = client.matchLocationFromConnectionProfileName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchConnectionProfileFromConnectionProfileName', () => { - const result = client.matchConnectionProfileFromConnectionProfileName(fakePath); - assert.strictEqual(result, "connectionProfileValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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('privateConnection', () => { - const fakePath = "/rendered/path/privateConnection"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - private_connection: "privateConnectionValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.privateConnectionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.privateConnectionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('privateConnectionPath', () => { - const result = client.privateConnectionPath("projectValue", "locationValue", "privateConnectionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.privateConnectionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPrivateConnectionName', () => { - const result = client.matchProjectFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPrivateConnectionName', () => { - const result = client.matchLocationFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPrivateConnectionFromPrivateConnectionName', () => { - const result = client.matchPrivateConnectionFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "privateConnectionValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('route', () => { - const fakePath = "/rendered/path/route"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - private_connection: "privateConnectionValue", - route: "routeValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.routePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.routePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('routePath', () => { - const result = client.routePath("projectValue", "locationValue", "privateConnectionValue", "routeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.routePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRouteName', () => { - const result = client.matchProjectFromRouteName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRouteName', () => { - const result = client.matchLocationFromRouteName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPrivateConnectionFromRouteName', () => { - const result = client.matchPrivateConnectionFromRouteName(fakePath); - assert.strictEqual(result, "privateConnectionValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRouteFromRouteName', () => { - const result = client.matchRouteFromRouteName(fakePath); - assert.strictEqual(result, "routeValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('stream', () => { - const fakePath = "/rendered/path/stream"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - stream: "streamValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.streamPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.streamPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('streamPath', () => { - const result = client.streamPath("projectValue", "locationValue", "streamValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.streamPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromStreamName', () => { - const result = client.matchProjectFromStreamName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromStreamName', () => { - const result = client.matchLocationFromStreamName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchStreamFromStreamName', () => { - const result = client.matchStreamFromStreamName(fakePath); - assert.strictEqual(result, "streamValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('streamObject', () => { - const fakePath = "/rendered/path/streamObject"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - stream: "streamValue", - object: "objectValue", - }; - const client = new datastreamModule.v1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.streamObjectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.streamObjectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('streamObjectPath', () => { - const result = client.streamObjectPath("projectValue", "locationValue", "streamValue", "objectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.streamObjectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromStreamObjectName', () => { - const result = client.matchProjectFromStreamObjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.streamObjectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromStreamObjectName', () => { - const result = client.matchLocationFromStreamObjectName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.streamObjectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchStreamFromStreamObjectName', () => { - const result = client.matchStreamFromStreamObjectName(fakePath); - assert.strictEqual(result, "streamValue"); - assert((client.pathTemplates.streamObjectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchObjectFromStreamObjectName', () => { - const result = client.matchObjectFromStreamObjectName(fakePath); - assert.strictEqual(result, "objectValue"); - assert((client.pathTemplates.streamObjectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1/tsconfig.json b/owl-bot-staging/google-cloud-datastream/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-datastream/v1/webpack.config.js b/owl-bot-staging/google-cloud-datastream/v1/webpack.config.js deleted file mode 100644 index ce71b478c09..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1/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: 'Datastream', - filename: './datastream.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-datastream/v1alpha1/.eslintignore b/owl-bot-staging/google-cloud-datastream/v1alpha1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.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-datastream/v1alpha1/.eslintrc.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/.gitignore b/owl-bot-staging/google-cloud-datastream/v1alpha1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.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-datastream/v1alpha1/.jsdoc.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/.jsdoc.js deleted file mode 100644 index d3af80fe491..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.jsdoc.js +++ /dev/null @@ -1,55 +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 -// -// 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 2025 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/datastream', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/.mocharc.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/.mocharc.js deleted file mode 100644 index 24e9d15257f..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.mocharc.js +++ /dev/null @@ -1,33 +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 -// -// 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-datastream/v1alpha1/.prettierrc.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/.prettierrc.js deleted file mode 100644 index d89a632f90b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/.prettierrc.js +++ /dev/null @@ -1,22 +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 -// -// 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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/README.md b/owl-bot-staging/google-cloud-datastream/v1alpha1/README.md deleted file mode 100644 index a7903c0b77c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/README.md +++ /dev/null @@ -1 +0,0 @@ -Datastream: Nodejs Client diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/package.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/package.json deleted file mode 100644 index 6eee35e6b34..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/datastream", - "version": "0.1.0", - "description": "Datastream client for Node.js", - "repository": "googleapis/nodejs-datastream", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google datastream", - "datastream", - "datastream" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream.proto b/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream.proto deleted file mode 100644 index a832fed11ca..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream.proto +++ /dev/null @@ -1,895 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datastream.v1alpha1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datastream/v1alpha1/datastream_resources.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Datastream.V1Alpha1"; -option go_package = "cloud.google.com/go/datastream/apiv1alpha1/datastreampb;datastreampb"; -option java_multiple_files = true; -option java_outer_classname = "CloudDatastreamServiceProto"; -option java_package = "com.google.cloud.datastream.v1alpha1"; -option php_namespace = "Google\\Cloud\\Datastream\\V1alpha1"; -option ruby_package = "Google::Cloud::Datastream::V1alpha1"; - -// Datastream service -service Datastream { - option (google.api.default_host) = "datastream.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Use this method to list connection profiles created in a project and - // location. - rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to get details about a connection profile. - rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a connection profile in a project and location. - rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles" - body: "connection_profile" - }; - option (google.api.method_signature) = "parent,connection_profile,connection_profile_id"; - option (google.longrunning.operation_info) = { - response_type: "ConnectionProfile" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to update the parameters of a connection profile. - rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" - body: "connection_profile" - }; - option (google.api.method_signature) = "connection_profile,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "ConnectionProfile" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to delete a connection profile.. - rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to discover a connection profile. - // The discover API call exposes the data objects and metadata belonging to - // the profile. Typically, a request returns children data objects under a - // parent data object that's optionally supplied in the request. - rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) returns (DiscoverConnectionProfileResponse) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles:discover" - body: "*" - }; - } - - // Use this method to list streams in a project and location. - rpc ListStreams(ListStreamsRequest) returns (ListStreamsResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*/locations/*}/streams" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to get details about a stream. - rpc GetStream(GetStreamRequest) returns (Stream) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/locations/*/streams/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a stream. - rpc CreateStream(CreateStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*/locations/*}/streams" - body: "stream" - }; - option (google.api.method_signature) = "parent,stream,stream_id"; - option (google.longrunning.operation_info) = { - response_type: "Stream" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to update the configuration of a stream. - rpc UpdateStream(UpdateStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha1/{stream.name=projects/*/locations/*/streams/*}" - body: "stream" - }; - option (google.api.method_signature) = "stream,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Stream" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to delete a stream. - rpc DeleteStream(DeleteStreamRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/locations/*/streams/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to fetch any errors associated with a stream. - rpc FetchErrors(FetchErrorsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{stream=projects/*/locations/*/streams/*}:fetchErrors" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "FetchErrorsResponse" - metadata_type: "OperationMetadata" - }; - } - - // The FetchStaticIps API call exposes the static ips used by Datastream. - // Typically, a request returns children data objects under - // a parent data object that's optionally supplied in the request. - rpc FetchStaticIps(FetchStaticIpsRequest) returns (FetchStaticIpsResponse) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/locations/*}:fetchStaticIps" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to create a private connectivity configuration. - rpc CreatePrivateConnection(CreatePrivateConnectionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*/locations/*}/privateConnections" - body: "private_connection" - }; - option (google.api.method_signature) = "parent,private_connection,private_connection_id"; - option (google.longrunning.operation_info) = { - response_type: "PrivateConnection" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to get details about a private connectivity configuration. - rpc GetPrivateConnection(GetPrivateConnectionRequest) returns (PrivateConnection) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to list private connectivity configurations in a project - // and location. - rpc ListPrivateConnections(ListPrivateConnectionsRequest) returns (ListPrivateConnectionsResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*/locations/*}/privateConnections" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to delete a private connectivity configuration. - rpc DeletePrivateConnection(DeletePrivateConnectionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to create a route for a private connectivity in a project - // and location. - rpc CreateRoute(CreateRouteRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes" - body: "route" - }; - option (google.api.method_signature) = "parent,route,route_id"; - option (google.longrunning.operation_info) = { - response_type: "Route" - metadata_type: "OperationMetadata" - }; - } - - // Use this method to get details about a route. - rpc GetRoute(GetRouteRequest) returns (Route) { - option (google.api.http) = { - get: "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Use this method to list routes created for a private connectivity in a - // project and location. - rpc ListRoutes(ListRoutesRequest) returns (ListRoutesResponse) { - option (google.api.http) = { - get: "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes" - }; - option (google.api.method_signature) = "parent"; - } - - // Use this method to delete a route. - rpc DeleteRoute(DeleteRouteRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request message for 'discover' ConnectionProfile request. -message DiscoverConnectionProfileRequest { - // Required. The parent resource of the ConnectionProfile type. Must be in the - // format `projects/*/locations/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // The connection profile on which to run discover. - oneof target { - // An ad-hoc ConnectionProfile configuration. - ConnectionProfile connection_profile = 200; - - // A reference to an existing ConnectionProfile. - string connection_profile_name = 201; - } - - oneof depth { - // Whether to retrieve the full hierarchy of data objects (TRUE) or only the - // current level (FALSE). - bool recursive = 3; - - // The number of hierarchy levels below the current level to be retrieved. - int32 recursion_depth = 4; - } - - // The data object to enrich with child data objects and metadata. - oneof data_object { - // Oracle RDBMS to enrich with child data objects and metadata. - OracleRdbms oracle_rdbms = 100; - - // MySQL RDBMS to enrich with child data objects and metadata. - MysqlRdbms mysql_rdbms = 101; - } -} - -message DiscoverConnectionProfileResponse { - // The data object that has been enriched by the discover API call. - oneof data_object { - // Enriched Oracle RDBMS object. - OracleRdbms oracle_rdbms = 100; - - // Enriched MySQL RDBMS object. - MysqlRdbms mysql_rdbms = 101; - } -} - -// Request message for 'FetchStaticIps' request. -message FetchStaticIpsRequest { - // Required. The name resource of the Response type. Must be in the - // format `projects/*/locations/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Maximum number of Ips to return, will likely not be specified. - int32 page_size = 2; - - // A page token, received from a previous `ListStaticIps` call. - // will likely not be specified. - string page_token = 3; -} - -// Response message for a 'FetchStaticIps' response. -message FetchStaticIpsResponse { - // list of static ips by account - repeated string static_ips = 1; - - // A token that 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; -} - -// Request message for 'FetchErrors' request. -message FetchErrorsRequest { - // Name of the Stream resource for which to fetch any errors. - string stream = 1 [(google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - }]; -} - -// Response message for a 'FetchErrors' response. -message FetchErrorsResponse { - // The list of errors on the Stream. - repeated Error errors = 1; -} - -message ListConnectionProfilesRequest { - // Required. The parent that owns the collection of connection profiles. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Maximum number of connection profiles to return. - // If unspecified, at most 50 connection profiles will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListConnectionProfiles` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListConnectionProfiles` - // must match the call that provided the page token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -message ListConnectionProfilesResponse { - // List of connection profiles. - repeated ConnectionProfile connection_profiles = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -message GetConnectionProfileRequest { - // Required. The name of the connection profile resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; -} - -message CreateConnectionProfileRequest { - // Required. The parent that owns the collection of ConnectionProfiles. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Required. The connection profile identifier. - string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The connection profile resource to create. - ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message UpdateConnectionProfileRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // ConnectionProfile resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The ConnectionProfile to update. - ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -message DeleteConnectionProfileRequest { - // Required. The name of the connection profile resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/ConnectionProfile" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListStreamsRequest { - // Required. The parent that owns the collection of streams. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Stream" - } - ]; - - // Maximum number of streams to return. - // If unspecified, at most 50 streams will be returned. The maximum - // value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListStreams` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListStreams` - // must match the call that provided the page token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -message ListStreamsResponse { - // List of streams - repeated Stream streams = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -message GetStreamRequest { - // Required. The name of the stream resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; -} - -message CreateStreamRequest { - // Required. The parent that owns the collection of streams. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Stream" - } - ]; - - // Required. The stream identifier. - string stream_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The stream resource to create. - Stream stream = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the stream, but do not create any resources. - // The default is false. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Create the stream without validating it. - bool force = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -message UpdateStreamRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // stream resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The stream resource to update. - Stream stream = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only validate the stream with the changes, without actually updating it. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Execute the update without validating it. - bool force = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -message DeleteStreamRequest { - // Required. The name of the stream resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Stream" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the user has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Results of executed validations if there are any. - ValidationResult validation_result = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -message CreatePrivateConnectionRequest { - // Required. The parent that owns the collection of PrivateConnections. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Required. The private connectivity identifier. - string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Private Connectivity resource to create. - PrivateConnection private_connection = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListPrivateConnectionsRequest { - // Required. The parent that owns the collection of private connectivity configurations. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Maximum number of private connectivity configurations to return. - // If unspecified, at most 50 private connectivity configurations that will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2; - - // Page token received from a previous `ListPrivateConnections` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to - // `ListPrivateConnections` must match the call that provided the page - // token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -message ListPrivateConnectionsResponse { - // List of private connectivity configurations. - repeated PrivateConnection private_connections = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -message DeletePrivateConnectionRequest { - // Required. The name of the private connectivity configuration to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/PrivateConnection" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, any child routes that belong to this PrivateConnection will - // also be deleted. - bool force = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -message GetPrivateConnectionRequest { - // Required. The name of the private connectivity configuration to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/PrivateConnection" - } - ]; -} - -// route creation request -message CreateRouteRequest { - // Required. The parent that owns the collection of Routes. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Route" - } - ]; - - // Required. The Route identifier. - string route_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Route resource to create. - Route route = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// route list request -message ListRoutesRequest { - // Required. The parent that owns the collection of Routess. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datastream.googleapis.com/Route" - } - ]; - - // Maximum number of Routes to return. The service may return - // fewer than this value. If unspecified, at most 50 Routes - // will be returned. The maximum value is 1000; values above 1000 will be - // coerced to 1000. - int32 page_size = 2; - - // Page token received from a previous `ListRoutes` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to - // `ListRoutes` must match the call that provided the page - // token. - string page_token = 3; - - // Filter request. - string filter = 4; - - // Order by fields for the result. - string order_by = 5; -} - -// route list response -message ListRoutesResponse { - // List of Routes. - repeated Route routes = 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; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// route deletion request -message DeleteRouteRequest { - // Required. The name of the Route resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Route" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// route get request -message GetRouteRequest { - // Required. The name of the Route resource to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datastream.googleapis.com/Route" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream_resources.proto b/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream_resources.proto deleted file mode 100644 index 7e757552ed1..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/google/cloud/datastream/v1alpha1/datastream_resources.proto +++ /dev/null @@ -1,683 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datastream.v1alpha1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/datastream/apiv1alpha1/datastreampb;datastreampb"; -option java_multiple_files = true; -option java_outer_classname = "CloudDatastreamResourcesProto"; -option java_package = "com.google.cloud.datastream.v1alpha1"; -option csharp_namespace = "Google.Cloud.Datastream.V1Alpha1"; -option php_namespace = "Google\\Cloud\\Datastream\\V1alpha1"; -option ruby_package = "Google::Cloud::Datastream::V1alpha1"; - -// Oracle database profile. -message OracleProfile { - // Required. Hostname for the Oracle connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the Oracle connection, default value is 1521. - int32 port = 2; - - // Required. Username for the Oracle connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Password for the Oracle connection. - string password = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. Database for the Oracle connection. - string database_service = 5 [(google.api.field_behavior) = REQUIRED]; - - // Connection string attributes - map connection_attributes = 6; -} - -// MySQL database profile. -message MysqlProfile { - // Required. Hostname for the MySQL connection. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Port for the MySQL connection, default value is 3306. - int32 port = 2; - - // Required. Username for the MySQL connection. - string username = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Input only. Password for the MySQL connection. - string password = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // SSL configuration for the MySQL connection. - MysqlSslConfig ssl_config = 5; -} - -// Cloud Storage bucket profile. -message GcsProfile { - // Required. The full project and resource path for Cloud Storage bucket including the - // name. - string bucket_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // The root path inside the Cloud Storage bucket. - string root_path = 2; -} - -// No connectivity settings. -message NoConnectivitySettings { - -} - -// Static IP address connectivity. -message StaticServiceIpConnectivity { - -} - -// Forward SSH Tunnel connectivity. -message ForwardSshTunnelConnectivity { - // Required. Hostname for the SSH tunnel. - string hostname = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Username for the SSH tunnel. - string username = 2 [(google.api.field_behavior) = REQUIRED]; - - // Port for the SSH tunnel, default value is 22. - int32 port = 3; - - oneof authentication_method { - // Input only. SSH password. - string password = 100 [(google.api.field_behavior) = INPUT_ONLY]; - - // Input only. SSH private key. - string private_key = 101 [(google.api.field_behavior) = INPUT_ONLY]; - } -} - -// The VPC Peering configuration is used to create VPC peering between -// Datastream and the consumer's VPC. -message VpcPeeringConfig { - // Required. fully qualified name of the VPC Datastream will peer to. - string vpc_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. A free subnet for peering. (CIDR of /29) - string subnet = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The PrivateConnection resource is used to establish private connectivity -// between Datastream and a customer's network. -message PrivateConnection { - option (google.api.resource) = { - type: "datastream.googleapis.com/PrivateConnection" - pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}" - }; - - // Private Connection state. - enum State { - STATE_UNSPECIFIED = 0; - - // The private connection is in creation state - creating resources. - CREATING = 1; - - // The private connection has been created with all of it's resources. - CREATED = 2; - - // The private connection creation has failed. - FAILED = 3; - } - - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The state of the Private Connection. - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. In case of error, the details of the error in a user-friendly format. - Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // VPC Peering Config - VpcPeeringConfig vpc_peering_config = 100; -} - -// Private Connectivity -message PrivateConnectivity { - string private_connection_name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Route resource is the child of the PrivateConnection resource. -// It used to define a route for a PrivateConnection setup. -message Route { - option (google.api.resource) = { - type: "datastream.googleapis.com/Route" - pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" - }; - - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination address for connection - string destination_address = 6 [(google.api.field_behavior) = REQUIRED]; - - // Destination port for connection - int32 destination_port = 7; -} - -// MySQL SSL configuration information. -message MysqlSslConfig { - // Input only. PEM-encoded private key associated with the Client Certificate. - // If this field is used then the 'client_certificate' and the - // 'ca_certificate' fields are mandatory. - string client_key = 11 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the client_key field is set. - bool client_key_set = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. PEM-encoded certificate that will be used by the replica to - // authenticate against the source database server. If this field is used - // then the 'client_key' and the 'ca_certificate' fields are mandatory. - string client_certificate = 13 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the client_certificate field is set. - bool client_certificate_set = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. PEM-encoded certificate of the CA that signed the source database - // server's certificate. - string ca_certificate = 15 [(google.api.field_behavior) = INPUT_ONLY]; - - // Output only. Indicates whether the ca_certificate field is set. - bool ca_certificate_set = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -message ConnectionProfile { - option (google.api.resource) = { - type: "datastream.googleapis.com/ConnectionProfile" - pattern: "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" - }; - - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Connection configuration for the ConnectionProfile. - oneof profile { - // Oracle ConnectionProfile configuration. - OracleProfile oracle_profile = 100; - - // Cloud Storage ConnectionProfile configuration. - GcsProfile gcs_profile = 101; - - // MySQL ConnectionProfile configuration. - MysqlProfile mysql_profile = 102; - } - - // Connectivity options used to establish a connection to the profile. - oneof connectivity { - // No connectivity option chosen. - NoConnectivitySettings no_connectivity = 200; - - // Static Service IP connectivity. - StaticServiceIpConnectivity static_service_ip_connectivity = 201; - - // Forward SSH tunnel connectivity. - ForwardSshTunnelConnectivity forward_ssh_connectivity = 202; - - // Private connectivity. - PrivateConnectivity private_connectivity = 203; - } -} - -// Oracle Column. -message OracleColumn { - // Column name. - string column_name = 1; - - // The Oracle data type. - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column precision. - int32 precision = 4; - - // Column scale. - int32 scale = 5; - - // Column encoding. - string encoding = 6; - - // Whether or not the column represents a primary key. - bool primary_key = 7; - - // Whether or not the column can accept a null value. - bool nullable = 8; - - // The ordinal position of the column in the table. - int32 ordinal_position = 9; -} - -// Oracle table. -message OracleTable { - // Table name. - string table_name = 1; - - // Oracle columns in the schema. - // When unspecified as part of inclue/exclude lists, includes/excludes - // everything. - repeated OracleColumn oracle_columns = 2; -} - -// Oracle schema. -message OracleSchema { - // Schema name. - string schema_name = 1; - - // Tables in the schema. - repeated OracleTable oracle_tables = 2; -} - -// Oracle database structure. -message OracleRdbms { - // Oracle schemas/databases in the database server. - repeated OracleSchema oracle_schemas = 1; -} - -// Oracle data source configuration -message OracleSourceConfig { - // Oracle objects to include in the stream. - OracleRdbms allowlist = 1; - - // Oracle objects to exclude from the stream. - OracleRdbms rejectlist = 2; -} - -// MySQL Column. -message MysqlColumn { - // Column name. - string column_name = 1; - - // The MySQL data type. Full data types list can be found here: - // https://dev.mysql.com/doc/refman/8.0/en/data-types.html - string data_type = 2; - - // Column length. - int32 length = 3; - - // Column collation. - string collation = 4; - - // Whether or not the column represents a primary key. - bool primary_key = 5; - - // Whether or not the column can accept a null value. - bool nullable = 6; - - // The ordinal position of the column in the table. - int32 ordinal_position = 7; -} - -// MySQL table. -message MysqlTable { - // Table name. - string table_name = 1; - - // MySQL columns in the database. - // When unspecified as part of include/exclude lists, includes/excludes - // everything. - repeated MysqlColumn mysql_columns = 2; -} - -// MySQL database. -message MysqlDatabase { - // Database name. - string database_name = 1; - - // Tables in the database. - repeated MysqlTable mysql_tables = 2; -} - -// MySQL database structure -message MysqlRdbms { - // Mysql databases on the server - repeated MysqlDatabase mysql_databases = 1; -} - -// MySQL source configuration -message MysqlSourceConfig { - // MySQL objects to retrieve from the source. - MysqlRdbms allowlist = 1; - - // MySQL objects to exclude from the stream. - MysqlRdbms rejectlist = 2; -} - -// The configuration of the stream source. -message SourceConfig { - // Required. Source connection profile identifier. - string source_connection_profile_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Stream configuration that is specific to the data source type. - oneof source_stream_config { - // Oracle data source configuration - OracleSourceConfig oracle_source_config = 100; - - // MySQL data source configuration - MysqlSourceConfig mysql_source_config = 101; - } -} - -// AVRO file format configuration. -message AvroFileFormat { - -} - -// File format in Cloud Storage. -enum GcsFileFormat { - option deprecated = true; - - // Unspecified Cloud Storage file format. - GCS_FILE_FORMAT_UNSPECIFIED = 0; - - // Avro file format - AVRO = 1; -} - -// Schema file format. -enum SchemaFileFormat { - // Unspecified schema file format. - SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; - - // Do not attach schema file. - NO_SCHEMA_FILE = 1; - - // Avro schema format. - AVRO_SCHEMA_FILE = 2; -} - -// JSON file format configuration. -message JsonFileFormat { - // Json file compression. - enum JsonCompression { - // Unspecified json file compression. - JSON_COMPRESSION_UNSPECIFIED = 0; - - // Do not compress JSON file. - NO_COMPRESSION = 1; - - // Gzip compression. - GZIP = 2; - } - - // The schema file format along JSON data files. - SchemaFileFormat schema_file_format = 1; - - // Compression of the loaded JSON file. - JsonCompression compression = 2; -} - -// Google Cloud Storage destination configuration -message GcsDestinationConfig { - // Path inside the Cloud Storage bucket to write data to. - string path = 1; - - // File format that data should be written in. - // Deprecated field - use file_format instead. - GcsFileFormat gcs_file_format = 2 [deprecated = true]; - - // The maximum file size to be saved in the bucket. - int32 file_rotation_mb = 3; - - // The maximum duration for which new events are added before a file is - // closed and a new file is created. - google.protobuf.Duration file_rotation_interval = 4; - - // File Format that the data should be written in. - oneof file_format { - // AVRO file format configuration. - AvroFileFormat avro_file_format = 100; - - // JSON file format configuration. - JsonFileFormat json_file_format = 101; - } -} - -// The configuration of the stream destination. -message DestinationConfig { - // Required. Destination connection profile identifier. - string destination_connection_profile_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Stream configuration that is specific to the data destination type. - oneof destination_stream_config { - GcsDestinationConfig gcs_destination_config = 100; - } -} - -message Stream { - option (google.api.resource) = { - type: "datastream.googleapis.com/Stream" - pattern: "projects/{project}/locations/{location}/streams/{stream}" - }; - - // Backfill strategy to automatically backfill the Stream's objects. - // Specific objects can be excluded. - message BackfillAllStrategy { - // List of objects to exclude. - oneof excluded_objects { - // Oracle data source objects to avoid backfilling. - OracleRdbms oracle_excluded_objects = 1; - - // MySQL data source objects to avoid backfilling. - MysqlRdbms mysql_excluded_objects = 2; - } - } - - // Backfill strategy to disable automatic backfill for the Stream's objects. - message BackfillNoneStrategy { - - } - - // Stream state. - enum State { - // Unspecified stream state. - STATE_UNSPECIFIED = 0; - - // The stream has been created. - CREATED = 1; - - // The stream is running. - RUNNING = 2; - - // The stream is paused. - PAUSED = 3; - - // The stream is in maintenance mode. - // - // Updates are rejected on the resource in this state. - MAINTENANCE = 4; - - // The stream is experiencing an error that is preventing data from being - // streamed. - FAILED = 5; - - // The stream has experienced a terminal failure. - FAILED_PERMANENTLY = 6; - - // The stream is starting, but not yet running. - STARTING = 7; - - // The Stream is no longer reading new events, but still writing events in - // the buffer. - DRAINING = 8; - } - - // Output only. The stream's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The creation time of the stream. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of the stream. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels. - map labels = 4; - - // Required. Display name. - string display_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Source connection profile configuration. - SourceConfig source_config = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination connection profile configuration. - DestinationConfig destination_config = 7 [(google.api.field_behavior) = REQUIRED]; - - // The state of the stream. - State state = 8; - - // Stream backfill strategy. - oneof backfill_strategy { - // Automatically backfill objects included in the stream source - // configuration. Specific objects can be excluded. - BackfillAllStrategy backfill_all = 101; - - // Do not automatically backfill any objects. - BackfillNoneStrategy backfill_none = 102; - } - - // Output only. Errors on the Stream. - repeated Error errors = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represent a user-facing Error. -message Error { - // A title that explains the reason for the error. - string reason = 1; - - // A unique identifier for this specific error, - // allowing it to be traced throughout the system in logs and API responses. - string error_uuid = 2; - - // A message containing more information about the error that occurred. - string message = 3; - - // The time when the error occurred. - google.protobuf.Timestamp error_time = 4; - - // Additional information about the error. - map details = 5; -} - -// Contains the current validation results. -message ValidationResult { - // A list of validations (includes both executed as well as not executed - // validations). - repeated Validation validations = 1; -} - -message Validation { - // Validation execution status. - enum Status { - // Unspecified status. - STATUS_UNSPECIFIED = 0; - - // Validation did not execute. - NOT_EXECUTED = 1; - - // Validation failed. - FAILED = 2; - - // Validation passed. - PASSED = 3; - } - - // A short description of the validation. - string description = 1; - - // Validation execution status. - Status status = 2; - - // Messages reflecting the validation results. - repeated ValidationMessage message = 3; - - // A custom code identifying this validation. - string code = 4; -} - -// Represent user-facing validation result message. -message ValidationMessage { - // Validation message level. - enum Level { - // Unspecified level. - LEVEL_UNSPECIFIED = 0; - - // Potentially cause issues with the Stream. - WARNING = 1; - - // Definitely cause issues with the Stream. - ERROR = 2; - } - - // The result of the validation. - string message = 1; - - // Message severity level (warning or error). - Level level = 2; - - // Additional metadata related to the result. - map metadata = 3; - - // A custom code identifying this specific message. - string code = 4; -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.d.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.d.ts deleted file mode 100644 index 3fcb09b5a0e..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.d.ts +++ /dev/null @@ -1,15466 +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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace datastream. */ - namespace datastream { - - /** Namespace v1alpha1. */ - namespace v1alpha1 { - - /** Represents a Datastream */ - class Datastream extends $protobuf.rpc.Service { - - /** - * Constructs a new Datastream 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 Datastream 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): Datastream; - - /** - * Calls ListConnectionProfiles. - * @param request ListConnectionProfilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectionProfilesResponse - */ - public listConnectionProfiles(request: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, callback: google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfilesCallback): void; - - /** - * Calls ListConnectionProfiles. - * @param request ListConnectionProfilesRequest message or plain object - * @returns Promise - */ - public listConnectionProfiles(request: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest): Promise; - - /** - * Calls GetConnectionProfile. - * @param request GetConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectionProfile - */ - public getConnectionProfile(request: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, callback: google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfileCallback): void; - - /** - * Calls GetConnectionProfile. - * @param request GetConnectionProfileRequest message or plain object - * @returns Promise - */ - public getConnectionProfile(request: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest): Promise; - - /** - * Calls CreateConnectionProfile. - * @param request CreateConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectionProfile(request: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, callback: google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfileCallback): void; - - /** - * Calls CreateConnectionProfile. - * @param request CreateConnectionProfileRequest message or plain object - * @returns Promise - */ - public createConnectionProfile(request: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest): Promise; - - /** - * Calls UpdateConnectionProfile. - * @param request UpdateConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectionProfile(request: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, callback: google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfileCallback): void; - - /** - * Calls UpdateConnectionProfile. - * @param request UpdateConnectionProfileRequest message or plain object - * @returns Promise - */ - public updateConnectionProfile(request: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest): Promise; - - /** - * Calls DeleteConnectionProfile. - * @param request DeleteConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectionProfile(request: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, callback: google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfileCallback): void; - - /** - * Calls DeleteConnectionProfile. - * @param request DeleteConnectionProfileRequest message or plain object - * @returns Promise - */ - public deleteConnectionProfile(request: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest): Promise; - - /** - * Calls DiscoverConnectionProfile. - * @param request DiscoverConnectionProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DiscoverConnectionProfileResponse - */ - public discoverConnectionProfile(request: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, callback: google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfileCallback): void; - - /** - * Calls DiscoverConnectionProfile. - * @param request DiscoverConnectionProfileRequest message or plain object - * @returns Promise - */ - public discoverConnectionProfile(request: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest): Promise; - - /** - * Calls ListStreams. - * @param request ListStreamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListStreamsResponse - */ - public listStreams(request: google.cloud.datastream.v1alpha1.IListStreamsRequest, callback: google.cloud.datastream.v1alpha1.Datastream.ListStreamsCallback): void; - - /** - * Calls ListStreams. - * @param request ListStreamsRequest message or plain object - * @returns Promise - */ - public listStreams(request: google.cloud.datastream.v1alpha1.IListStreamsRequest): Promise; - - /** - * Calls GetStream. - * @param request GetStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Stream - */ - public getStream(request: google.cloud.datastream.v1alpha1.IGetStreamRequest, callback: google.cloud.datastream.v1alpha1.Datastream.GetStreamCallback): void; - - /** - * Calls GetStream. - * @param request GetStreamRequest message or plain object - * @returns Promise - */ - public getStream(request: google.cloud.datastream.v1alpha1.IGetStreamRequest): Promise; - - /** - * Calls CreateStream. - * @param request CreateStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createStream(request: google.cloud.datastream.v1alpha1.ICreateStreamRequest, callback: google.cloud.datastream.v1alpha1.Datastream.CreateStreamCallback): void; - - /** - * Calls CreateStream. - * @param request CreateStreamRequest message or plain object - * @returns Promise - */ - public createStream(request: google.cloud.datastream.v1alpha1.ICreateStreamRequest): Promise; - - /** - * Calls UpdateStream. - * @param request UpdateStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateStream(request: google.cloud.datastream.v1alpha1.IUpdateStreamRequest, callback: google.cloud.datastream.v1alpha1.Datastream.UpdateStreamCallback): void; - - /** - * Calls UpdateStream. - * @param request UpdateStreamRequest message or plain object - * @returns Promise - */ - public updateStream(request: google.cloud.datastream.v1alpha1.IUpdateStreamRequest): Promise; - - /** - * Calls DeleteStream. - * @param request DeleteStreamRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteStream(request: google.cloud.datastream.v1alpha1.IDeleteStreamRequest, callback: google.cloud.datastream.v1alpha1.Datastream.DeleteStreamCallback): void; - - /** - * Calls DeleteStream. - * @param request DeleteStreamRequest message or plain object - * @returns Promise - */ - public deleteStream(request: google.cloud.datastream.v1alpha1.IDeleteStreamRequest): Promise; - - /** - * Calls FetchErrors. - * @param request FetchErrorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public fetchErrors(request: google.cloud.datastream.v1alpha1.IFetchErrorsRequest, callback: google.cloud.datastream.v1alpha1.Datastream.FetchErrorsCallback): void; - - /** - * Calls FetchErrors. - * @param request FetchErrorsRequest message or plain object - * @returns Promise - */ - public fetchErrors(request: google.cloud.datastream.v1alpha1.IFetchErrorsRequest): Promise; - - /** - * Calls FetchStaticIps. - * @param request FetchStaticIpsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchStaticIpsResponse - */ - public fetchStaticIps(request: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, callback: google.cloud.datastream.v1alpha1.Datastream.FetchStaticIpsCallback): void; - - /** - * Calls FetchStaticIps. - * @param request FetchStaticIpsRequest message or plain object - * @returns Promise - */ - public fetchStaticIps(request: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest): Promise; - - /** - * Calls CreatePrivateConnection. - * @param request CreatePrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createPrivateConnection(request: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, callback: google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnectionCallback): void; - - /** - * Calls CreatePrivateConnection. - * @param request CreatePrivateConnectionRequest message or plain object - * @returns Promise - */ - public createPrivateConnection(request: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest): Promise; - - /** - * Calls GetPrivateConnection. - * @param request GetPrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateConnection - */ - public getPrivateConnection(request: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, callback: google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnectionCallback): void; - - /** - * Calls GetPrivateConnection. - * @param request GetPrivateConnectionRequest message or plain object - * @returns Promise - */ - public getPrivateConnection(request: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest): Promise; - - /** - * Calls ListPrivateConnections. - * @param request ListPrivateConnectionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse - */ - public listPrivateConnections(request: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, callback: google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnectionsCallback): void; - - /** - * Calls ListPrivateConnections. - * @param request ListPrivateConnectionsRequest message or plain object - * @returns Promise - */ - public listPrivateConnections(request: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest): Promise; - - /** - * Calls DeletePrivateConnection. - * @param request DeletePrivateConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deletePrivateConnection(request: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, callback: google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnectionCallback): void; - - /** - * Calls DeletePrivateConnection. - * @param request DeletePrivateConnectionRequest message or plain object - * @returns Promise - */ - public deletePrivateConnection(request: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest): Promise; - - /** - * Calls CreateRoute. - * @param request CreateRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createRoute(request: google.cloud.datastream.v1alpha1.ICreateRouteRequest, callback: google.cloud.datastream.v1alpha1.Datastream.CreateRouteCallback): void; - - /** - * Calls CreateRoute. - * @param request CreateRouteRequest message or plain object - * @returns Promise - */ - public createRoute(request: google.cloud.datastream.v1alpha1.ICreateRouteRequest): Promise; - - /** - * Calls GetRoute. - * @param request GetRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Route - */ - public getRoute(request: google.cloud.datastream.v1alpha1.IGetRouteRequest, callback: google.cloud.datastream.v1alpha1.Datastream.GetRouteCallback): void; - - /** - * Calls GetRoute. - * @param request GetRouteRequest message or plain object - * @returns Promise - */ - public getRoute(request: google.cloud.datastream.v1alpha1.IGetRouteRequest): Promise; - - /** - * Calls ListRoutes. - * @param request ListRoutesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRoutesResponse - */ - public listRoutes(request: google.cloud.datastream.v1alpha1.IListRoutesRequest, callback: google.cloud.datastream.v1alpha1.Datastream.ListRoutesCallback): void; - - /** - * Calls ListRoutes. - * @param request ListRoutesRequest message or plain object - * @returns Promise - */ - public listRoutes(request: google.cloud.datastream.v1alpha1.IListRoutesRequest): Promise; - - /** - * Calls DeleteRoute. - * @param request DeleteRouteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteRoute(request: google.cloud.datastream.v1alpha1.IDeleteRouteRequest, callback: google.cloud.datastream.v1alpha1.Datastream.DeleteRouteCallback): void; - - /** - * Calls DeleteRoute. - * @param request DeleteRouteRequest message or plain object - * @returns Promise - */ - public deleteRoute(request: google.cloud.datastream.v1alpha1.IDeleteRouteRequest): Promise; - } - - namespace Datastream { - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listConnectionProfiles}. - * @param error Error, if any - * @param [response] ListConnectionProfilesResponse - */ - type ListConnectionProfilesCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getConnectionProfile}. - * @param error Error, if any - * @param [response] ConnectionProfile - */ - type GetConnectionProfileCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.ConnectionProfile) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|updateConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteConnectionProfile}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|discoverConnectionProfile}. - * @param error Error, if any - * @param [response] DiscoverConnectionProfileResponse - */ - type DiscoverConnectionProfileCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listStreams}. - * @param error Error, if any - * @param [response] ListStreamsResponse - */ - type ListStreamsCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.ListStreamsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getStream}. - * @param error Error, if any - * @param [response] Stream - */ - type GetStreamCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.Stream) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createStream}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|updateStream}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteStream}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|fetchErrors}. - * @param error Error, if any - * @param [response] Operation - */ - type FetchErrorsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|fetchStaticIps}. - * @param error Error, if any - * @param [response] FetchStaticIpsResponse - */ - type FetchStaticIpsCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.FetchStaticIpsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createPrivateConnection}. - * @param error Error, if any - * @param [response] Operation - */ - type CreatePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getPrivateConnection}. - * @param error Error, if any - * @param [response] PrivateConnection - */ - type GetPrivateConnectionCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.PrivateConnection) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listPrivateConnections}. - * @param error Error, if any - * @param [response] ListPrivateConnectionsResponse - */ - type ListPrivateConnectionsCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deletePrivateConnection}. - * @param error Error, if any - * @param [response] Operation - */ - type DeletePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createRoute}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateRouteCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getRoute}. - * @param error Error, if any - * @param [response] Route - */ - type GetRouteCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.Route) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listRoutes}. - * @param error Error, if any - * @param [response] ListRoutesResponse - */ - type ListRoutesCallback = (error: (Error|null), response?: google.cloud.datastream.v1alpha1.ListRoutesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteRoute}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteRouteCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a DiscoverConnectionProfileRequest. */ - interface IDiscoverConnectionProfileRequest { - - /** DiscoverConnectionProfileRequest parent */ - parent?: (string|null); - - /** DiscoverConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** DiscoverConnectionProfileRequest connectionProfileName */ - connectionProfileName?: (string|null); - - /** DiscoverConnectionProfileRequest recursive */ - recursive?: (boolean|null); - - /** DiscoverConnectionProfileRequest recursionDepth */ - recursionDepth?: (number|null); - - /** DiscoverConnectionProfileRequest oracleRdbms */ - oracleRdbms?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** DiscoverConnectionProfileRequest mysqlRdbms */ - mysqlRdbms?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - } - - /** Represents a DiscoverConnectionProfileRequest. */ - class DiscoverConnectionProfileRequest implements IDiscoverConnectionProfileRequest { - - /** - * Constructs a new DiscoverConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest); - - /** DiscoverConnectionProfileRequest parent. */ - public parent: string; - - /** DiscoverConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** DiscoverConnectionProfileRequest connectionProfileName. */ - public connectionProfileName?: (string|null); - - /** DiscoverConnectionProfileRequest recursive. */ - public recursive?: (boolean|null); - - /** DiscoverConnectionProfileRequest recursionDepth. */ - public recursionDepth?: (number|null); - - /** DiscoverConnectionProfileRequest oracleRdbms. */ - public oracleRdbms?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** DiscoverConnectionProfileRequest mysqlRdbms. */ - public mysqlRdbms?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileRequest target. */ - public target?: ("connectionProfile"|"connectionProfileName"); - - /** DiscoverConnectionProfileRequest depth. */ - public depth?: ("recursive"|"recursionDepth"); - - /** DiscoverConnectionProfileRequest dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"); - - /** - * Creates a new DiscoverConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest): google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @param message DiscoverConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @param message DiscoverConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DiscoverConnectionProfileRequest; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.DiscoverConnectionProfileRequest; - - /** - * Verifies a DiscoverConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest; - - /** - * Creates a plain object from a DiscoverConnectionProfileRequest message. Also converts values to other types if specified. - * @param message DiscoverConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DiscoverConnectionProfileResponse. */ - interface IDiscoverConnectionProfileResponse { - - /** DiscoverConnectionProfileResponse oracleRdbms */ - oracleRdbms?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** DiscoverConnectionProfileResponse mysqlRdbms */ - mysqlRdbms?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - } - - /** Represents a DiscoverConnectionProfileResponse. */ - class DiscoverConnectionProfileResponse implements IDiscoverConnectionProfileResponse { - - /** - * Constructs a new DiscoverConnectionProfileResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse); - - /** DiscoverConnectionProfileResponse oracleRdbms. */ - public oracleRdbms?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** DiscoverConnectionProfileResponse mysqlRdbms. */ - public mysqlRdbms?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** DiscoverConnectionProfileResponse dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"); - - /** - * Creates a new DiscoverConnectionProfileResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverConnectionProfileResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse): google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @param message DiscoverConnectionProfileResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @param message DiscoverConnectionProfileResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DiscoverConnectionProfileResponse; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverConnectionProfileResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.DiscoverConnectionProfileResponse; - - /** - * Verifies a DiscoverConnectionProfileResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverConnectionProfileResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverConnectionProfileResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse; - - /** - * Creates a plain object from a DiscoverConnectionProfileResponse message. Also converts values to other types if specified. - * @param message DiscoverConnectionProfileResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverConnectionProfileResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverConnectionProfileResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchStaticIpsRequest. */ - interface IFetchStaticIpsRequest { - - /** FetchStaticIpsRequest name */ - name?: (string|null); - - /** FetchStaticIpsRequest pageSize */ - pageSize?: (number|null); - - /** FetchStaticIpsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a FetchStaticIpsRequest. */ - class FetchStaticIpsRequest implements IFetchStaticIpsRequest { - - /** - * Constructs a new FetchStaticIpsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest); - - /** FetchStaticIpsRequest name. */ - public name: string; - - /** FetchStaticIpsRequest pageSize. */ - public pageSize: number; - - /** FetchStaticIpsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new FetchStaticIpsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchStaticIpsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest): google.cloud.datastream.v1alpha1.FetchStaticIpsRequest; - - /** - * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsRequest.verify|verify} messages. - * @param message FetchStaticIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsRequest.verify|verify} messages. - * @param message FetchStaticIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchStaticIpsRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.FetchStaticIpsRequest; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchStaticIpsRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.FetchStaticIpsRequest; - - /** - * Verifies a FetchStaticIpsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchStaticIpsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.FetchStaticIpsRequest; - - /** - * Creates a plain object from a FetchStaticIpsRequest message. Also converts values to other types if specified. - * @param message FetchStaticIpsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.FetchStaticIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchStaticIpsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchStaticIpsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchStaticIpsResponse. */ - interface IFetchStaticIpsResponse { - - /** FetchStaticIpsResponse staticIps */ - staticIps?: (string[]|null); - - /** FetchStaticIpsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a FetchStaticIpsResponse. */ - class FetchStaticIpsResponse implements IFetchStaticIpsResponse { - - /** - * Constructs a new FetchStaticIpsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse); - - /** FetchStaticIpsResponse staticIps. */ - public staticIps: string[]; - - /** FetchStaticIpsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new FetchStaticIpsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchStaticIpsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse): google.cloud.datastream.v1alpha1.FetchStaticIpsResponse; - - /** - * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsResponse.verify|verify} messages. - * @param message FetchStaticIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsResponse.verify|verify} messages. - * @param message FetchStaticIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchStaticIpsResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.FetchStaticIpsResponse; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchStaticIpsResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.FetchStaticIpsResponse; - - /** - * Verifies a FetchStaticIpsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchStaticIpsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.FetchStaticIpsResponse; - - /** - * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. - * @param message FetchStaticIpsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.FetchStaticIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchStaticIpsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchStaticIpsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchErrorsRequest. */ - interface IFetchErrorsRequest { - - /** FetchErrorsRequest stream */ - stream?: (string|null); - } - - /** Represents a FetchErrorsRequest. */ - class FetchErrorsRequest implements IFetchErrorsRequest { - - /** - * Constructs a new FetchErrorsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IFetchErrorsRequest); - - /** FetchErrorsRequest stream. */ - public stream: string; - - /** - * Creates a new FetchErrorsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchErrorsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IFetchErrorsRequest): google.cloud.datastream.v1alpha1.FetchErrorsRequest; - - /** - * Encodes the specified FetchErrorsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsRequest.verify|verify} messages. - * @param message FetchErrorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IFetchErrorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchErrorsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsRequest.verify|verify} messages. - * @param message FetchErrorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IFetchErrorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchErrorsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchErrorsRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.FetchErrorsRequest; - - /** - * Decodes a FetchErrorsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchErrorsRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.FetchErrorsRequest; - - /** - * Verifies a FetchErrorsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchErrorsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchErrorsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.FetchErrorsRequest; - - /** - * Creates a plain object from a FetchErrorsRequest message. Also converts values to other types if specified. - * @param message FetchErrorsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.FetchErrorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchErrorsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchErrorsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchErrorsResponse. */ - interface IFetchErrorsResponse { - - /** FetchErrorsResponse errors */ - errors?: (google.cloud.datastream.v1alpha1.IError[]|null); - } - - /** Represents a FetchErrorsResponse. */ - class FetchErrorsResponse implements IFetchErrorsResponse { - - /** - * Constructs a new FetchErrorsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IFetchErrorsResponse); - - /** FetchErrorsResponse errors. */ - public errors: google.cloud.datastream.v1alpha1.IError[]; - - /** - * Creates a new FetchErrorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchErrorsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IFetchErrorsResponse): google.cloud.datastream.v1alpha1.FetchErrorsResponse; - - /** - * Encodes the specified FetchErrorsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsResponse.verify|verify} messages. - * @param message FetchErrorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IFetchErrorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchErrorsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsResponse.verify|verify} messages. - * @param message FetchErrorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IFetchErrorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchErrorsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchErrorsResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.FetchErrorsResponse; - - /** - * Decodes a FetchErrorsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchErrorsResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.FetchErrorsResponse; - - /** - * Verifies a FetchErrorsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchErrorsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchErrorsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.FetchErrorsResponse; - - /** - * Creates a plain object from a FetchErrorsResponse message. Also converts values to other types if specified. - * @param message FetchErrorsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.FetchErrorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchErrorsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchErrorsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectionProfilesRequest. */ - interface IListConnectionProfilesRequest { - - /** ListConnectionProfilesRequest parent */ - parent?: (string|null); - - /** ListConnectionProfilesRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectionProfilesRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectionProfilesRequest filter */ - filter?: (string|null); - - /** ListConnectionProfilesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectionProfilesRequest. */ - class ListConnectionProfilesRequest implements IListConnectionProfilesRequest { - - /** - * Constructs a new ListConnectionProfilesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest); - - /** ListConnectionProfilesRequest parent. */ - public parent: string; - - /** ListConnectionProfilesRequest pageSize. */ - public pageSize: number; - - /** ListConnectionProfilesRequest pageToken. */ - public pageToken: string; - - /** ListConnectionProfilesRequest filter. */ - public filter: string; - - /** ListConnectionProfilesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectionProfilesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectionProfilesRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest): google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest; - - /** - * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest.verify|verify} messages. - * @param message ListConnectionProfilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest.verify|verify} messages. - * @param message ListConnectionProfilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectionProfilesRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListConnectionProfilesRequest; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectionProfilesRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.ListConnectionProfilesRequest; - - /** - * Verifies a ListConnectionProfilesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectionProfilesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest; - - /** - * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. - * @param message ListConnectionProfilesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectionProfilesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectionProfilesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectionProfilesResponse. */ - interface IListConnectionProfilesResponse { - - /** ListConnectionProfilesResponse connectionProfiles */ - connectionProfiles?: (google.cloud.datastream.v1alpha1.IConnectionProfile[]|null); - - /** ListConnectionProfilesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectionProfilesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectionProfilesResponse. */ - class ListConnectionProfilesResponse implements IListConnectionProfilesResponse { - - /** - * Constructs a new ListConnectionProfilesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse); - - /** ListConnectionProfilesResponse connectionProfiles. */ - public connectionProfiles: google.cloud.datastream.v1alpha1.IConnectionProfile[]; - - /** ListConnectionProfilesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectionProfilesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectionProfilesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectionProfilesResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse): google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse; - - /** - * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.verify|verify} messages. - * @param message ListConnectionProfilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.verify|verify} messages. - * @param message ListConnectionProfilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectionProfilesResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListConnectionProfilesResponse; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectionProfilesResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.ListConnectionProfilesResponse; - - /** - * Verifies a ListConnectionProfilesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectionProfilesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse; - - /** - * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. - * @param message ListConnectionProfilesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectionProfilesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectionProfilesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectionProfileRequest. */ - interface IGetConnectionProfileRequest { - - /** GetConnectionProfileRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectionProfileRequest. */ - class GetConnectionProfileRequest implements IGetConnectionProfileRequest { - - /** - * Constructs a new GetConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest); - - /** GetConnectionProfileRequest name. */ - public name: string; - - /** - * Creates a new GetConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest): google.cloud.datastream.v1alpha1.GetConnectionProfileRequest; - - /** - * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetConnectionProfileRequest.verify|verify} messages. - * @param message GetConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetConnectionProfileRequest.verify|verify} messages. - * @param message GetConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GetConnectionProfileRequest; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.GetConnectionProfileRequest; - - /** - * Verifies a GetConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GetConnectionProfileRequest; - - /** - * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. - * @param message GetConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GetConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectionProfileRequest. */ - interface ICreateConnectionProfileRequest { - - /** CreateConnectionProfileRequest parent */ - parent?: (string|null); - - /** CreateConnectionProfileRequest connectionProfileId */ - connectionProfileId?: (string|null); - - /** CreateConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** CreateConnectionProfileRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateConnectionProfileRequest. */ - class CreateConnectionProfileRequest implements ICreateConnectionProfileRequest { - - /** - * Constructs a new CreateConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest); - - /** CreateConnectionProfileRequest parent. */ - public parent: string; - - /** CreateConnectionProfileRequest connectionProfileId. */ - public connectionProfileId: string; - - /** CreateConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** CreateConnectionProfileRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest): google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest; - - /** - * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.verify|verify} messages. - * @param message CreateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.verify|verify} messages. - * @param message CreateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.CreateConnectionProfileRequest; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.CreateConnectionProfileRequest; - - /** - * Verifies a CreateConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest; - - /** - * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. - * @param message CreateConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectionProfileRequest. */ - interface IUpdateConnectionProfileRequest { - - /** UpdateConnectionProfileRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectionProfileRequest connectionProfile */ - connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** UpdateConnectionProfileRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateConnectionProfileRequest. */ - class UpdateConnectionProfileRequest implements IUpdateConnectionProfileRequest { - - /** - * Constructs a new UpdateConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest); - - /** UpdateConnectionProfileRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectionProfileRequest connectionProfile. */ - public connectionProfile?: (google.cloud.datastream.v1alpha1.IConnectionProfile|null); - - /** UpdateConnectionProfileRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest): google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest; - - /** - * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.verify|verify} messages. - * @param message UpdateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.verify|verify} messages. - * @param message UpdateConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.UpdateConnectionProfileRequest; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.UpdateConnectionProfileRequest; - - /** - * Verifies an UpdateConnectionProfileRequest message. - * @param message Plain 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 UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest; - - /** - * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. - * @param message UpdateConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectionProfileRequest. */ - interface IDeleteConnectionProfileRequest { - - /** DeleteConnectionProfileRequest name */ - name?: (string|null); - - /** DeleteConnectionProfileRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteConnectionProfileRequest. */ - class DeleteConnectionProfileRequest implements IDeleteConnectionProfileRequest { - - /** - * Constructs a new DeleteConnectionProfileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest); - - /** DeleteConnectionProfileRequest name. */ - public name: string; - - /** DeleteConnectionProfileRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteConnectionProfileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectionProfileRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest): google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest; - - /** - * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest.verify|verify} messages. - * @param message DeleteConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest.verify|verify} messages. - * @param message DeleteConnectionProfileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectionProfileRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DeleteConnectionProfileRequest; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectionProfileRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.DeleteConnectionProfileRequest; - - /** - * Verifies a DeleteConnectionProfileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectionProfileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest; - - /** - * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. - * @param message DeleteConnectionProfileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectionProfileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectionProfileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamsRequest. */ - interface IListStreamsRequest { - - /** ListStreamsRequest parent */ - parent?: (string|null); - - /** ListStreamsRequest pageSize */ - pageSize?: (number|null); - - /** ListStreamsRequest pageToken */ - pageToken?: (string|null); - - /** ListStreamsRequest filter */ - filter?: (string|null); - - /** ListStreamsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListStreamsRequest. */ - class ListStreamsRequest implements IListStreamsRequest { - - /** - * Constructs a new ListStreamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListStreamsRequest); - - /** ListStreamsRequest parent. */ - public parent: string; - - /** ListStreamsRequest pageSize. */ - public pageSize: number; - - /** ListStreamsRequest pageToken. */ - public pageToken: string; - - /** ListStreamsRequest filter. */ - public filter: string; - - /** ListStreamsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListStreamsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListStreamsRequest): google.cloud.datastream.v1alpha1.ListStreamsRequest; - - /** - * Encodes the specified ListStreamsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsRequest.verify|verify} messages. - * @param message ListStreamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsRequest.verify|verify} messages. - * @param message ListStreamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamsRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListStreamsRequest; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamsRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.ListStreamsRequest; - - /** - * Verifies a ListStreamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListStreamsRequest; - - /** - * Creates a plain object from a ListStreamsRequest message. Also converts values to other types if specified. - * @param message ListStreamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListStreamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStreamsResponse. */ - interface IListStreamsResponse { - - /** ListStreamsResponse streams */ - streams?: (google.cloud.datastream.v1alpha1.IStream[]|null); - - /** ListStreamsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListStreamsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListStreamsResponse. */ - class ListStreamsResponse implements IListStreamsResponse { - - /** - * Constructs a new ListStreamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListStreamsResponse); - - /** ListStreamsResponse streams. */ - public streams: google.cloud.datastream.v1alpha1.IStream[]; - - /** ListStreamsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListStreamsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListStreamsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStreamsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListStreamsResponse): google.cloud.datastream.v1alpha1.ListStreamsResponse; - - /** - * Encodes the specified ListStreamsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsResponse.verify|verify} messages. - * @param message ListStreamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStreamsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsResponse.verify|verify} messages. - * @param message ListStreamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStreamsResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListStreamsResponse; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStreamsResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.ListStreamsResponse; - - /** - * Verifies a ListStreamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListStreamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStreamsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListStreamsResponse; - - /** - * Creates a plain object from a ListStreamsResponse message. Also converts values to other types if specified. - * @param message ListStreamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListStreamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStreamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStreamsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetStreamRequest. */ - interface IGetStreamRequest { - - /** GetStreamRequest name */ - name?: (string|null); - } - - /** Represents a GetStreamRequest. */ - class GetStreamRequest implements IGetStreamRequest { - - /** - * Constructs a new GetStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGetStreamRequest); - - /** GetStreamRequest name. */ - public name: string; - - /** - * Creates a new GetStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGetStreamRequest): google.cloud.datastream.v1alpha1.GetStreamRequest; - - /** - * Encodes the specified GetStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetStreamRequest.verify|verify} messages. - * @param message GetStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGetStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetStreamRequest.verify|verify} messages. - * @param message GetStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGetStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GetStreamRequest; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetStreamRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.GetStreamRequest; - - /** - * Verifies a GetStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GetStreamRequest; - - /** - * Creates a plain object from a GetStreamRequest message. Also converts values to other types if specified. - * @param message GetStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GetStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateStreamRequest. */ - interface ICreateStreamRequest { - - /** CreateStreamRequest parent */ - parent?: (string|null); - - /** CreateStreamRequest streamId */ - streamId?: (string|null); - - /** CreateStreamRequest stream */ - stream?: (google.cloud.datastream.v1alpha1.IStream|null); - - /** CreateStreamRequest requestId */ - requestId?: (string|null); - - /** CreateStreamRequest validateOnly */ - validateOnly?: (boolean|null); - - /** CreateStreamRequest force */ - force?: (boolean|null); - } - - /** Represents a CreateStreamRequest. */ - class CreateStreamRequest implements ICreateStreamRequest { - - /** - * Constructs a new CreateStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.ICreateStreamRequest); - - /** CreateStreamRequest parent. */ - public parent: string; - - /** CreateStreamRequest streamId. */ - public streamId: string; - - /** CreateStreamRequest stream. */ - public stream?: (google.cloud.datastream.v1alpha1.IStream|null); - - /** CreateStreamRequest requestId. */ - public requestId: string; - - /** CreateStreamRequest validateOnly. */ - public validateOnly: boolean; - - /** CreateStreamRequest force. */ - public force: boolean; - - /** - * Creates a new CreateStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.ICreateStreamRequest): google.cloud.datastream.v1alpha1.CreateStreamRequest; - - /** - * Encodes the specified CreateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateStreamRequest.verify|verify} messages. - * @param message CreateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.ICreateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateStreamRequest.verify|verify} messages. - * @param message CreateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.ICreateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.CreateStreamRequest; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateStreamRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.CreateStreamRequest; - - /** - * Verifies a CreateStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.CreateStreamRequest; - - /** - * Creates a plain object from a CreateStreamRequest message. Also converts values to other types if specified. - * @param message CreateStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.CreateStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateStreamRequest. */ - interface IUpdateStreamRequest { - - /** UpdateStreamRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStreamRequest stream */ - stream?: (google.cloud.datastream.v1alpha1.IStream|null); - - /** UpdateStreamRequest requestId */ - requestId?: (string|null); - - /** UpdateStreamRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateStreamRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateStreamRequest. */ - class UpdateStreamRequest implements IUpdateStreamRequest { - - /** - * Constructs a new UpdateStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IUpdateStreamRequest); - - /** UpdateStreamRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStreamRequest stream. */ - public stream?: (google.cloud.datastream.v1alpha1.IStream|null); - - /** UpdateStreamRequest requestId. */ - public requestId: string; - - /** UpdateStreamRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateStreamRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IUpdateStreamRequest): google.cloud.datastream.v1alpha1.UpdateStreamRequest; - - /** - * Encodes the specified UpdateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateStreamRequest.verify|verify} messages. - * @param message UpdateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IUpdateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateStreamRequest.verify|verify} messages. - * @param message UpdateStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IUpdateStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.UpdateStreamRequest; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateStreamRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.UpdateStreamRequest; - - /** - * Verifies an UpdateStreamRequest message. - * @param message Plain 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 UpdateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.UpdateStreamRequest; - - /** - * Creates a plain object from an UpdateStreamRequest message. Also converts values to other types if specified. - * @param message UpdateStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.UpdateStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteStreamRequest. */ - interface IDeleteStreamRequest { - - /** DeleteStreamRequest name */ - name?: (string|null); - - /** DeleteStreamRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteStreamRequest. */ - class DeleteStreamRequest implements IDeleteStreamRequest { - - /** - * Constructs a new DeleteStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDeleteStreamRequest); - - /** DeleteStreamRequest name. */ - public name: string; - - /** DeleteStreamRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteStreamRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDeleteStreamRequest): google.cloud.datastream.v1alpha1.DeleteStreamRequest; - - /** - * Encodes the specified DeleteStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteStreamRequest.verify|verify} messages. - * @param message DeleteStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDeleteStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteStreamRequest.verify|verify} messages. - * @param message DeleteStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDeleteStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteStreamRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DeleteStreamRequest; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteStreamRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.DeleteStreamRequest; - - /** - * Verifies a DeleteStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteStreamRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DeleteStreamRequest; - - /** - * Creates a plain object from a DeleteStreamRequest message. Also converts values to other types if specified. - * @param message DeleteStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DeleteStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteStreamRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - - /** OperationMetadata validationResult */ - validationResult?: (google.cloud.datastream.v1alpha1.IValidationResult|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; - - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** OperationMetadata validationResult. */ - public validationResult?: (google.cloud.datastream.v1alpha1.IValidationResult|null); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOperationMetadata): google.cloud.datastream.v1alpha1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OperationMetadata; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @throws {Error} If the payload 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.datastream.v1alpha1.OperationMetadata; - - /** - * Verifies an OperationMetadata message. - * @param message Plain 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePrivateConnectionRequest. */ - interface ICreatePrivateConnectionRequest { - - /** CreatePrivateConnectionRequest parent */ - parent?: (string|null); - - /** CreatePrivateConnectionRequest privateConnectionId */ - privateConnectionId?: (string|null); - - /** CreatePrivateConnectionRequest privateConnection */ - privateConnection?: (google.cloud.datastream.v1alpha1.IPrivateConnection|null); - - /** CreatePrivateConnectionRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreatePrivateConnectionRequest. */ - class CreatePrivateConnectionRequest implements ICreatePrivateConnectionRequest { - - /** - * Constructs a new CreatePrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest); - - /** CreatePrivateConnectionRequest parent. */ - public parent: string; - - /** CreatePrivateConnectionRequest privateConnectionId. */ - public privateConnectionId: string; - - /** CreatePrivateConnectionRequest privateConnection. */ - public privateConnection?: (google.cloud.datastream.v1alpha1.IPrivateConnection|null); - - /** CreatePrivateConnectionRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreatePrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest): google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest; - - /** - * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.verify|verify} messages. - * @param message CreatePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.verify|verify} messages. - * @param message CreatePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.CreatePrivateConnectionRequest; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.CreatePrivateConnectionRequest; - - /** - * Verifies a CreatePrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest; - - /** - * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. - * @param message CreatePrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPrivateConnectionsRequest. */ - interface IListPrivateConnectionsRequest { - - /** ListPrivateConnectionsRequest parent */ - parent?: (string|null); - - /** ListPrivateConnectionsRequest pageSize */ - pageSize?: (number|null); - - /** ListPrivateConnectionsRequest pageToken */ - pageToken?: (string|null); - - /** ListPrivateConnectionsRequest filter */ - filter?: (string|null); - - /** ListPrivateConnectionsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListPrivateConnectionsRequest. */ - class ListPrivateConnectionsRequest implements IListPrivateConnectionsRequest { - - /** - * Constructs a new ListPrivateConnectionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest); - - /** ListPrivateConnectionsRequest parent. */ - public parent: string; - - /** ListPrivateConnectionsRequest pageSize. */ - public pageSize: number; - - /** ListPrivateConnectionsRequest pageToken. */ - public pageToken: string; - - /** ListPrivateConnectionsRequest filter. */ - public filter: string; - - /** ListPrivateConnectionsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListPrivateConnectionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPrivateConnectionsRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest): google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest; - - /** - * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest.verify|verify} messages. - * @param message ListPrivateConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest.verify|verify} messages. - * @param message ListPrivateConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPrivateConnectionsRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListPrivateConnectionsRequest; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPrivateConnectionsRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.ListPrivateConnectionsRequest; - - /** - * Verifies a ListPrivateConnectionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPrivateConnectionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest; - - /** - * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. - * @param message ListPrivateConnectionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPrivateConnectionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPrivateConnectionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPrivateConnectionsResponse. */ - interface IListPrivateConnectionsResponse { - - /** ListPrivateConnectionsResponse privateConnections */ - privateConnections?: (google.cloud.datastream.v1alpha1.IPrivateConnection[]|null); - - /** ListPrivateConnectionsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListPrivateConnectionsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListPrivateConnectionsResponse. */ - class ListPrivateConnectionsResponse implements IListPrivateConnectionsResponse { - - /** - * Constructs a new ListPrivateConnectionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse); - - /** ListPrivateConnectionsResponse privateConnections. */ - public privateConnections: google.cloud.datastream.v1alpha1.IPrivateConnection[]; - - /** ListPrivateConnectionsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListPrivateConnectionsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListPrivateConnectionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPrivateConnectionsResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse): google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse; - - /** - * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.verify|verify} messages. - * @param message ListPrivateConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.verify|verify} messages. - * @param message ListPrivateConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPrivateConnectionsResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListPrivateConnectionsResponse; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPrivateConnectionsResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.ListPrivateConnectionsResponse; - - /** - * Verifies a ListPrivateConnectionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPrivateConnectionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse; - - /** - * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. - * @param message ListPrivateConnectionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPrivateConnectionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPrivateConnectionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePrivateConnectionRequest. */ - interface IDeletePrivateConnectionRequest { - - /** DeletePrivateConnectionRequest name */ - name?: (string|null); - - /** DeletePrivateConnectionRequest requestId */ - requestId?: (string|null); - - /** DeletePrivateConnectionRequest force */ - force?: (boolean|null); - } - - /** Represents a DeletePrivateConnectionRequest. */ - class DeletePrivateConnectionRequest implements IDeletePrivateConnectionRequest { - - /** - * Constructs a new DeletePrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest); - - /** DeletePrivateConnectionRequest name. */ - public name: string; - - /** DeletePrivateConnectionRequest requestId. */ - public requestId: string; - - /** DeletePrivateConnectionRequest force. */ - public force: boolean; - - /** - * Creates a new DeletePrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest): google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest; - - /** - * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest.verify|verify} messages. - * @param message DeletePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest.verify|verify} messages. - * @param message DeletePrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DeletePrivateConnectionRequest; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.DeletePrivateConnectionRequest; - - /** - * Verifies a DeletePrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest; - - /** - * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. - * @param message DeletePrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPrivateConnectionRequest. */ - interface IGetPrivateConnectionRequest { - - /** GetPrivateConnectionRequest name */ - name?: (string|null); - } - - /** Represents a GetPrivateConnectionRequest. */ - class GetPrivateConnectionRequest implements IGetPrivateConnectionRequest { - - /** - * Constructs a new GetPrivateConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest); - - /** GetPrivateConnectionRequest name. */ - public name: string; - - /** - * Creates a new GetPrivateConnectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPrivateConnectionRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest): google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest; - - /** - * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest.verify|verify} messages. - * @param message GetPrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest.verify|verify} messages. - * @param message GetPrivateConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPrivateConnectionRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GetPrivateConnectionRequest; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPrivateConnectionRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.GetPrivateConnectionRequest; - - /** - * Verifies a GetPrivateConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPrivateConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest; - - /** - * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. - * @param message GetPrivateConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPrivateConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPrivateConnectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateRouteRequest. */ - interface ICreateRouteRequest { - - /** CreateRouteRequest parent */ - parent?: (string|null); - - /** CreateRouteRequest routeId */ - routeId?: (string|null); - - /** CreateRouteRequest route */ - route?: (google.cloud.datastream.v1alpha1.IRoute|null); - - /** CreateRouteRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateRouteRequest. */ - class CreateRouteRequest implements ICreateRouteRequest { - - /** - * Constructs a new CreateRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.ICreateRouteRequest); - - /** CreateRouteRequest parent. */ - public parent: string; - - /** CreateRouteRequest routeId. */ - public routeId: string; - - /** CreateRouteRequest route. */ - public route?: (google.cloud.datastream.v1alpha1.IRoute|null); - - /** CreateRouteRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.ICreateRouteRequest): google.cloud.datastream.v1alpha1.CreateRouteRequest; - - /** - * Encodes the specified CreateRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateRouteRequest.verify|verify} messages. - * @param message CreateRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.ICreateRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateRouteRequest.verify|verify} messages. - * @param message CreateRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.ICreateRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.CreateRouteRequest; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateRouteRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.CreateRouteRequest; - - /** - * Verifies a CreateRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.CreateRouteRequest; - - /** - * Creates a plain object from a CreateRouteRequest message. Also converts values to other types if specified. - * @param message CreateRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.CreateRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRoutesRequest. */ - interface IListRoutesRequest { - - /** ListRoutesRequest parent */ - parent?: (string|null); - - /** ListRoutesRequest pageSize */ - pageSize?: (number|null); - - /** ListRoutesRequest pageToken */ - pageToken?: (string|null); - - /** ListRoutesRequest filter */ - filter?: (string|null); - - /** ListRoutesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListRoutesRequest. */ - class ListRoutesRequest implements IListRoutesRequest { - - /** - * Constructs a new ListRoutesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListRoutesRequest); - - /** ListRoutesRequest parent. */ - public parent: string; - - /** ListRoutesRequest pageSize. */ - public pageSize: number; - - /** ListRoutesRequest pageToken. */ - public pageToken: string; - - /** ListRoutesRequest filter. */ - public filter: string; - - /** ListRoutesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListRoutesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRoutesRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListRoutesRequest): google.cloud.datastream.v1alpha1.ListRoutesRequest; - - /** - * Encodes the specified ListRoutesRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesRequest.verify|verify} messages. - * @param message ListRoutesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListRoutesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRoutesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesRequest.verify|verify} messages. - * @param message ListRoutesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListRoutesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRoutesRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListRoutesRequest; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRoutesRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.ListRoutesRequest; - - /** - * Verifies a ListRoutesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRoutesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRoutesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListRoutesRequest; - - /** - * Creates a plain object from a ListRoutesRequest message. Also converts values to other types if specified. - * @param message ListRoutesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListRoutesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRoutesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRoutesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRoutesResponse. */ - interface IListRoutesResponse { - - /** ListRoutesResponse routes */ - routes?: (google.cloud.datastream.v1alpha1.IRoute[]|null); - - /** ListRoutesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListRoutesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListRoutesResponse. */ - class ListRoutesResponse implements IListRoutesResponse { - - /** - * Constructs a new ListRoutesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IListRoutesResponse); - - /** ListRoutesResponse routes. */ - public routes: google.cloud.datastream.v1alpha1.IRoute[]; - - /** ListRoutesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListRoutesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListRoutesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRoutesResponse instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IListRoutesResponse): google.cloud.datastream.v1alpha1.ListRoutesResponse; - - /** - * Encodes the specified ListRoutesResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesResponse.verify|verify} messages. - * @param message ListRoutesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IListRoutesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRoutesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesResponse.verify|verify} messages. - * @param message ListRoutesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IListRoutesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRoutesResponse - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ListRoutesResponse; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRoutesResponse - * @throws {Error} If the payload 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.datastream.v1alpha1.ListRoutesResponse; - - /** - * Verifies a ListRoutesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRoutesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRoutesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ListRoutesResponse; - - /** - * Creates a plain object from a ListRoutesResponse message. Also converts values to other types if specified. - * @param message ListRoutesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ListRoutesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRoutesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRoutesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteRouteRequest. */ - interface IDeleteRouteRequest { - - /** DeleteRouteRequest name */ - name?: (string|null); - - /** DeleteRouteRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteRouteRequest. */ - class DeleteRouteRequest implements IDeleteRouteRequest { - - /** - * Constructs a new DeleteRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDeleteRouteRequest); - - /** DeleteRouteRequest name. */ - public name: string; - - /** DeleteRouteRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDeleteRouteRequest): google.cloud.datastream.v1alpha1.DeleteRouteRequest; - - /** - * Encodes the specified DeleteRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteRouteRequest.verify|verify} messages. - * @param message DeleteRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDeleteRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteRouteRequest.verify|verify} messages. - * @param message DeleteRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDeleteRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DeleteRouteRequest; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteRouteRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.DeleteRouteRequest; - - /** - * Verifies a DeleteRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DeleteRouteRequest; - - /** - * Creates a plain object from a DeleteRouteRequest message. Also converts values to other types if specified. - * @param message DeleteRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DeleteRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRouteRequest. */ - interface IGetRouteRequest { - - /** GetRouteRequest name */ - name?: (string|null); - } - - /** Represents a GetRouteRequest. */ - class GetRouteRequest implements IGetRouteRequest { - - /** - * Constructs a new GetRouteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGetRouteRequest); - - /** GetRouteRequest name. */ - public name: string; - - /** - * Creates a new GetRouteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRouteRequest instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGetRouteRequest): google.cloud.datastream.v1alpha1.GetRouteRequest; - - /** - * Encodes the specified GetRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetRouteRequest.verify|verify} messages. - * @param message GetRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGetRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetRouteRequest.verify|verify} messages. - * @param message GetRouteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGetRouteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRouteRequest - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GetRouteRequest; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRouteRequest - * @throws {Error} If the payload 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.datastream.v1alpha1.GetRouteRequest; - - /** - * Verifies a GetRouteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRouteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRouteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GetRouteRequest; - - /** - * Creates a plain object from a GetRouteRequest message. Also converts values to other types if specified. - * @param message GetRouteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GetRouteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRouteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRouteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleProfile. */ - interface IOracleProfile { - - /** OracleProfile hostname */ - hostname?: (string|null); - - /** OracleProfile port */ - port?: (number|null); - - /** OracleProfile username */ - username?: (string|null); - - /** OracleProfile password */ - password?: (string|null); - - /** OracleProfile databaseService */ - databaseService?: (string|null); - - /** OracleProfile connectionAttributes */ - connectionAttributes?: ({ [k: string]: string }|null); - } - - /** Represents an OracleProfile. */ - class OracleProfile implements IOracleProfile { - - /** - * Constructs a new OracleProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleProfile); - - /** OracleProfile hostname. */ - public hostname: string; - - /** OracleProfile port. */ - public port: number; - - /** OracleProfile username. */ - public username: string; - - /** OracleProfile password. */ - public password: string; - - /** OracleProfile databaseService. */ - public databaseService: string; - - /** OracleProfile connectionAttributes. */ - public connectionAttributes: { [k: string]: string }; - - /** - * Creates a new OracleProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleProfile instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleProfile): google.cloud.datastream.v1alpha1.OracleProfile; - - /** - * Encodes the specified OracleProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleProfile.verify|verify} messages. - * @param message OracleProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleProfile.verify|verify} messages. - * @param message OracleProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleProfile - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleProfile; - - /** - * Decodes an OracleProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleProfile - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleProfile; - - /** - * Verifies an OracleProfile message. - * @param message Plain 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 OracleProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleProfile; - - /** - * Creates a plain object from an OracleProfile message. Also converts values to other types if specified. - * @param message OracleProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlProfile. */ - interface IMysqlProfile { - - /** MysqlProfile hostname */ - hostname?: (string|null); - - /** MysqlProfile port */ - port?: (number|null); - - /** MysqlProfile username */ - username?: (string|null); - - /** MysqlProfile password */ - password?: (string|null); - - /** MysqlProfile sslConfig */ - sslConfig?: (google.cloud.datastream.v1alpha1.IMysqlSslConfig|null); - } - - /** Represents a MysqlProfile. */ - class MysqlProfile implements IMysqlProfile { - - /** - * Constructs a new MysqlProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlProfile); - - /** MysqlProfile hostname. */ - public hostname: string; - - /** MysqlProfile port. */ - public port: number; - - /** MysqlProfile username. */ - public username: string; - - /** MysqlProfile password. */ - public password: string; - - /** MysqlProfile sslConfig. */ - public sslConfig?: (google.cloud.datastream.v1alpha1.IMysqlSslConfig|null); - - /** - * Creates a new MysqlProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlProfile instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlProfile): google.cloud.datastream.v1alpha1.MysqlProfile; - - /** - * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlProfile.verify|verify} messages. - * @param message MysqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlProfile.verify|verify} messages. - * @param message MysqlProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlProfile - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlProfile; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlProfile - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlProfile; - - /** - * Verifies a MysqlProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlProfile; - - /** - * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. - * @param message MysqlProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsProfile. */ - interface IGcsProfile { - - /** GcsProfile bucketName */ - bucketName?: (string|null); - - /** GcsProfile rootPath */ - rootPath?: (string|null); - } - - /** Represents a GcsProfile. */ - class GcsProfile implements IGcsProfile { - - /** - * Constructs a new GcsProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGcsProfile); - - /** GcsProfile bucketName. */ - public bucketName: string; - - /** GcsProfile rootPath. */ - public rootPath: string; - - /** - * Creates a new GcsProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsProfile instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGcsProfile): google.cloud.datastream.v1alpha1.GcsProfile; - - /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsProfile - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GcsProfile; - - /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsProfile - * @throws {Error} If the payload 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.datastream.v1alpha1.GcsProfile; - - /** - * Verifies a GcsProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GcsProfile; - - /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. - * @param message GcsProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GcsProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NoConnectivitySettings. */ - interface INoConnectivitySettings { - } - - /** Represents a NoConnectivitySettings. */ - class NoConnectivitySettings implements INoConnectivitySettings { - - /** - * Constructs a new NoConnectivitySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.INoConnectivitySettings); - - /** - * Creates a new NoConnectivitySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NoConnectivitySettings instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.INoConnectivitySettings): google.cloud.datastream.v1alpha1.NoConnectivitySettings; - - /** - * Encodes the specified NoConnectivitySettings message. Does not implicitly {@link google.cloud.datastream.v1alpha1.NoConnectivitySettings.verify|verify} messages. - * @param message NoConnectivitySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.INoConnectivitySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NoConnectivitySettings message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.NoConnectivitySettings.verify|verify} messages. - * @param message NoConnectivitySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.INoConnectivitySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NoConnectivitySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NoConnectivitySettings - * @throws {Error} If the payload is not 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.datastream.v1alpha1.NoConnectivitySettings; - - /** - * Decodes a NoConnectivitySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NoConnectivitySettings - * @throws {Error} If the payload 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.datastream.v1alpha1.NoConnectivitySettings; - - /** - * Verifies a NoConnectivitySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NoConnectivitySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NoConnectivitySettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.NoConnectivitySettings; - - /** - * Creates a plain object from a NoConnectivitySettings message. Also converts values to other types if specified. - * @param message NoConnectivitySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.NoConnectivitySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NoConnectivitySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NoConnectivitySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StaticServiceIpConnectivity. */ - interface IStaticServiceIpConnectivity { - } - - /** Represents a StaticServiceIpConnectivity. */ - class StaticServiceIpConnectivity implements IStaticServiceIpConnectivity { - - /** - * Constructs a new StaticServiceIpConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity); - - /** - * Creates a new StaticServiceIpConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns StaticServiceIpConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity): google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity; - - /** - * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.verify|verify} messages. - * @param message StaticServiceIpConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.verify|verify} messages. - * @param message StaticServiceIpConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StaticServiceIpConnectivity - * @throws {Error} If the payload is not 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.datastream.v1alpha1.StaticServiceIpConnectivity; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StaticServiceIpConnectivity - * @throws {Error} If the payload 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.datastream.v1alpha1.StaticServiceIpConnectivity; - - /** - * Verifies a StaticServiceIpConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StaticServiceIpConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity; - - /** - * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. - * @param message StaticServiceIpConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StaticServiceIpConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StaticServiceIpConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ForwardSshTunnelConnectivity. */ - interface IForwardSshTunnelConnectivity { - - /** ForwardSshTunnelConnectivity hostname */ - hostname?: (string|null); - - /** ForwardSshTunnelConnectivity username */ - username?: (string|null); - - /** ForwardSshTunnelConnectivity port */ - port?: (number|null); - - /** ForwardSshTunnelConnectivity password */ - password?: (string|null); - - /** ForwardSshTunnelConnectivity privateKey */ - privateKey?: (string|null); - } - - /** Represents a ForwardSshTunnelConnectivity. */ - class ForwardSshTunnelConnectivity implements IForwardSshTunnelConnectivity { - - /** - * Constructs a new ForwardSshTunnelConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity); - - /** ForwardSshTunnelConnectivity hostname. */ - public hostname: string; - - /** ForwardSshTunnelConnectivity username. */ - public username: string; - - /** ForwardSshTunnelConnectivity port. */ - public port: number; - - /** ForwardSshTunnelConnectivity password. */ - public password?: (string|null); - - /** ForwardSshTunnelConnectivity privateKey. */ - public privateKey?: (string|null); - - /** ForwardSshTunnelConnectivity authenticationMethod. */ - public authenticationMethod?: ("password"|"privateKey"); - - /** - * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardSshTunnelConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity): google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @param message ForwardSshTunnelConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @param message ForwardSshTunnelConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ForwardSshTunnelConnectivity; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardSshTunnelConnectivity - * @throws {Error} If the payload 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.datastream.v1alpha1.ForwardSshTunnelConnectivity; - - /** - * Verifies a ForwardSshTunnelConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardSshTunnelConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity; - - /** - * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. - * @param message ForwardSshTunnelConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardSshTunnelConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardSshTunnelConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcPeeringConfig. */ - interface IVpcPeeringConfig { - - /** VpcPeeringConfig vpcName */ - vpcName?: (string|null); - - /** VpcPeeringConfig subnet */ - subnet?: (string|null); - } - - /** Represents a VpcPeeringConfig. */ - class VpcPeeringConfig implements IVpcPeeringConfig { - - /** - * Constructs a new VpcPeeringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IVpcPeeringConfig); - - /** VpcPeeringConfig vpcName. */ - public vpcName: string; - - /** VpcPeeringConfig subnet. */ - public subnet: string; - - /** - * Creates a new VpcPeeringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcPeeringConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IVpcPeeringConfig): google.cloud.datastream.v1alpha1.VpcPeeringConfig; - - /** - * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.VpcPeeringConfig.verify|verify} messages. - * @param message VpcPeeringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.VpcPeeringConfig.verify|verify} messages. - * @param message VpcPeeringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcPeeringConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.VpcPeeringConfig; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcPeeringConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.VpcPeeringConfig; - - /** - * Verifies a VpcPeeringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcPeeringConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.VpcPeeringConfig; - - /** - * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. - * @param message VpcPeeringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.VpcPeeringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcPeeringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcPeeringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateConnection. */ - interface IPrivateConnection { - - /** PrivateConnection name */ - name?: (string|null); - - /** PrivateConnection createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection labels */ - labels?: ({ [k: string]: string }|null); - - /** PrivateConnection displayName */ - displayName?: (string|null); - - /** PrivateConnection state */ - state?: (google.cloud.datastream.v1alpha1.PrivateConnection.State|keyof typeof google.cloud.datastream.v1alpha1.PrivateConnection.State|null); - - /** PrivateConnection error */ - error?: (google.cloud.datastream.v1alpha1.IError|null); - - /** PrivateConnection vpcPeeringConfig */ - vpcPeeringConfig?: (google.cloud.datastream.v1alpha1.IVpcPeeringConfig|null); - } - - /** Represents a PrivateConnection. */ - class PrivateConnection implements IPrivateConnection { - - /** - * Constructs a new PrivateConnection. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IPrivateConnection); - - /** PrivateConnection name. */ - public name: string; - - /** PrivateConnection createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** PrivateConnection labels. */ - public labels: { [k: string]: string }; - - /** PrivateConnection displayName. */ - public displayName: string; - - /** PrivateConnection state. */ - public state: (google.cloud.datastream.v1alpha1.PrivateConnection.State|keyof typeof google.cloud.datastream.v1alpha1.PrivateConnection.State); - - /** PrivateConnection error. */ - public error?: (google.cloud.datastream.v1alpha1.IError|null); - - /** PrivateConnection vpcPeeringConfig. */ - public vpcPeeringConfig?: (google.cloud.datastream.v1alpha1.IVpcPeeringConfig|null); - - /** - * Creates a new PrivateConnection instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnection instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IPrivateConnection): google.cloud.datastream.v1alpha1.PrivateConnection; - - /** - * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnection.verify|verify} messages. - * @param message PrivateConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnection.verify|verify} messages. - * @param message PrivateConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnection - * @throws {Error} If the payload is not 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.datastream.v1alpha1.PrivateConnection; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnection - * @throws {Error} If the payload 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.datastream.v1alpha1.PrivateConnection; - - /** - * Verifies a PrivateConnection message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnection - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.PrivateConnection; - - /** - * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. - * @param message PrivateConnection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.PrivateConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PrivateConnection { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - CREATED = 2, - FAILED = 3 - } - } - - /** Properties of a PrivateConnectivity. */ - interface IPrivateConnectivity { - - /** PrivateConnectivity privateConnectionName */ - privateConnectionName?: (string|null); - } - - /** Represents a PrivateConnectivity. */ - class PrivateConnectivity implements IPrivateConnectivity { - - /** - * Constructs a new PrivateConnectivity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IPrivateConnectivity); - - /** PrivateConnectivity privateConnectionName. */ - public privateConnectionName: string; - - /** - * Creates a new PrivateConnectivity instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateConnectivity instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IPrivateConnectivity): google.cloud.datastream.v1alpha1.PrivateConnectivity; - - /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnectivity.verify|verify} messages. - * @param message PrivateConnectivity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateConnectivity - * @throws {Error} If the payload is not 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.datastream.v1alpha1.PrivateConnectivity; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateConnectivity - * @throws {Error} If the payload 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.datastream.v1alpha1.PrivateConnectivity; - - /** - * Verifies a PrivateConnectivity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateConnectivity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.PrivateConnectivity; - - /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. - * @param message PrivateConnectivity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.PrivateConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateConnectivity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateConnectivity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Route. */ - interface IRoute { - - /** Route name */ - name?: (string|null); - - /** Route createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Route updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Route labels */ - labels?: ({ [k: string]: string }|null); - - /** Route displayName */ - displayName?: (string|null); - - /** Route destinationAddress */ - destinationAddress?: (string|null); - - /** Route destinationPort */ - destinationPort?: (number|null); - } - - /** Represents a Route. */ - class Route implements IRoute { - - /** - * Constructs a new Route. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IRoute); - - /** Route name. */ - public name: string; - - /** Route createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Route updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Route labels. */ - public labels: { [k: string]: string }; - - /** Route displayName. */ - public displayName: string; - - /** Route destinationAddress. */ - public destinationAddress: string; - - /** Route destinationPort. */ - public destinationPort: number; - - /** - * Creates a new Route instance using the specified properties. - * @param [properties] Properties to set - * @returns Route instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IRoute): google.cloud.datastream.v1alpha1.Route; - - /** - * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Route.verify|verify} messages. - * @param message Route message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Route.verify|verify} messages. - * @param message Route message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Route message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Route - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Route; - - /** - * Decodes a Route message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Route - * @throws {Error} If the payload 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.datastream.v1alpha1.Route; - - /** - * Verifies a Route message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Route message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Route - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Route; - - /** - * Creates a plain object from a Route message. Also converts values to other types if specified. - * @param message Route - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Route, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Route to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Route - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlSslConfig. */ - interface IMysqlSslConfig { - - /** MysqlSslConfig clientKey */ - clientKey?: (string|null); - - /** MysqlSslConfig clientKeySet */ - clientKeySet?: (boolean|null); - - /** MysqlSslConfig clientCertificate */ - clientCertificate?: (string|null); - - /** MysqlSslConfig clientCertificateSet */ - clientCertificateSet?: (boolean|null); - - /** MysqlSslConfig caCertificate */ - caCertificate?: (string|null); - - /** MysqlSslConfig caCertificateSet */ - caCertificateSet?: (boolean|null); - } - - /** Represents a MysqlSslConfig. */ - class MysqlSslConfig implements IMysqlSslConfig { - - /** - * Constructs a new MysqlSslConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlSslConfig); - - /** MysqlSslConfig clientKey. */ - public clientKey: string; - - /** MysqlSslConfig clientKeySet. */ - public clientKeySet: boolean; - - /** MysqlSslConfig clientCertificate. */ - public clientCertificate: string; - - /** MysqlSslConfig clientCertificateSet. */ - public clientCertificateSet: boolean; - - /** MysqlSslConfig caCertificate. */ - public caCertificate: string; - - /** MysqlSslConfig caCertificateSet. */ - public caCertificateSet: boolean; - - /** - * Creates a new MysqlSslConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlSslConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlSslConfig): google.cloud.datastream.v1alpha1.MysqlSslConfig; - - /** - * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSslConfig.verify|verify} messages. - * @param message MysqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSslConfig.verify|verify} messages. - * @param message MysqlSslConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlSslConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlSslConfig; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlSslConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlSslConfig; - - /** - * Verifies a MysqlSslConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlSslConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlSslConfig; - - /** - * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. - * @param message MysqlSslConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlSslConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlSslConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConnectionProfile. */ - interface IConnectionProfile { - - /** ConnectionProfile name */ - name?: (string|null); - - /** ConnectionProfile createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectionProfile displayName */ - displayName?: (string|null); - - /** ConnectionProfile oracleProfile */ - oracleProfile?: (google.cloud.datastream.v1alpha1.IOracleProfile|null); - - /** ConnectionProfile gcsProfile */ - gcsProfile?: (google.cloud.datastream.v1alpha1.IGcsProfile|null); - - /** ConnectionProfile mysqlProfile */ - mysqlProfile?: (google.cloud.datastream.v1alpha1.IMysqlProfile|null); - - /** ConnectionProfile noConnectivity */ - noConnectivity?: (google.cloud.datastream.v1alpha1.INoConnectivitySettings|null); - - /** ConnectionProfile staticServiceIpConnectivity */ - staticServiceIpConnectivity?: (google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity|null); - - /** ConnectionProfile forwardSshConnectivity */ - forwardSshConnectivity?: (google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity|null); - - /** ConnectionProfile privateConnectivity */ - privateConnectivity?: (google.cloud.datastream.v1alpha1.IPrivateConnectivity|null); - } - - /** Represents a ConnectionProfile. */ - class ConnectionProfile implements IConnectionProfile { - - /** - * Constructs a new ConnectionProfile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IConnectionProfile); - - /** ConnectionProfile name. */ - public name: string; - - /** ConnectionProfile createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectionProfile labels. */ - public labels: { [k: string]: string }; - - /** ConnectionProfile displayName. */ - public displayName: string; - - /** ConnectionProfile oracleProfile. */ - public oracleProfile?: (google.cloud.datastream.v1alpha1.IOracleProfile|null); - - /** ConnectionProfile gcsProfile. */ - public gcsProfile?: (google.cloud.datastream.v1alpha1.IGcsProfile|null); - - /** ConnectionProfile mysqlProfile. */ - public mysqlProfile?: (google.cloud.datastream.v1alpha1.IMysqlProfile|null); - - /** ConnectionProfile noConnectivity. */ - public noConnectivity?: (google.cloud.datastream.v1alpha1.INoConnectivitySettings|null); - - /** ConnectionProfile staticServiceIpConnectivity. */ - public staticServiceIpConnectivity?: (google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity|null); - - /** ConnectionProfile forwardSshConnectivity. */ - public forwardSshConnectivity?: (google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity|null); - - /** ConnectionProfile privateConnectivity. */ - public privateConnectivity?: (google.cloud.datastream.v1alpha1.IPrivateConnectivity|null); - - /** ConnectionProfile profile. */ - public profile?: ("oracleProfile"|"gcsProfile"|"mysqlProfile"); - - /** ConnectionProfile connectivity. */ - public connectivity?: ("noConnectivity"|"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"); - - /** - * Creates a new ConnectionProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectionProfile instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IConnectionProfile): google.cloud.datastream.v1alpha1.ConnectionProfile; - - /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectionProfile - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ConnectionProfile; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionProfile - * @throws {Error} If the payload 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.datastream.v1alpha1.ConnectionProfile; - - /** - * Verifies a ConnectionProfile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionProfile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ConnectionProfile; - - /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. - * @param message ConnectionProfile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionProfile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectionProfile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleColumn. */ - interface IOracleColumn { - - /** OracleColumn columnName */ - columnName?: (string|null); - - /** OracleColumn dataType */ - dataType?: (string|null); - - /** OracleColumn length */ - length?: (number|null); - - /** OracleColumn precision */ - precision?: (number|null); - - /** OracleColumn scale */ - scale?: (number|null); - - /** OracleColumn encoding */ - encoding?: (string|null); - - /** OracleColumn primaryKey */ - primaryKey?: (boolean|null); - - /** OracleColumn nullable */ - nullable?: (boolean|null); - - /** OracleColumn ordinalPosition */ - ordinalPosition?: (number|null); - } - - /** Represents an OracleColumn. */ - class OracleColumn implements IOracleColumn { - - /** - * Constructs a new OracleColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleColumn); - - /** OracleColumn columnName. */ - public columnName: string; - - /** OracleColumn dataType. */ - public dataType: string; - - /** OracleColumn length. */ - public length: number; - - /** OracleColumn precision. */ - public precision: number; - - /** OracleColumn scale. */ - public scale: number; - - /** OracleColumn encoding. */ - public encoding: string; - - /** OracleColumn primaryKey. */ - public primaryKey: boolean; - - /** OracleColumn nullable. */ - public nullable: boolean; - - /** OracleColumn ordinalPosition. */ - public ordinalPosition: number; - - /** - * Creates a new OracleColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleColumn instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleColumn): google.cloud.datastream.v1alpha1.OracleColumn; - - /** - * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleColumn.verify|verify} messages. - * @param message OracleColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleColumn.verify|verify} messages. - * @param message OracleColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleColumn - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleColumn; - - /** - * Decodes an OracleColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleColumn - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleColumn; - - /** - * Verifies an OracleColumn message. - * @param message Plain 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 OracleColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleColumn; - - /** - * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. - * @param message OracleColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleTable. */ - interface IOracleTable { - - /** OracleTable tableName */ - tableName?: (string|null); - - /** OracleTable oracleColumns */ - oracleColumns?: (google.cloud.datastream.v1alpha1.IOracleColumn[]|null); - } - - /** Represents an OracleTable. */ - class OracleTable implements IOracleTable { - - /** - * Constructs a new OracleTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleTable); - - /** OracleTable tableName. */ - public tableName: string; - - /** OracleTable oracleColumns. */ - public oracleColumns: google.cloud.datastream.v1alpha1.IOracleColumn[]; - - /** - * Creates a new OracleTable instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleTable instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleTable): google.cloud.datastream.v1alpha1.OracleTable; - - /** - * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleTable.verify|verify} messages. - * @param message OracleTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleTable.verify|verify} messages. - * @param message OracleTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleTable - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleTable; - - /** - * Decodes an OracleTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleTable - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleTable; - - /** - * Verifies an OracleTable message. - * @param message Plain 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 OracleTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleTable; - - /** - * Creates a plain object from an OracleTable message. Also converts values to other types if specified. - * @param message OracleTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleSchema. */ - interface IOracleSchema { - - /** OracleSchema schemaName */ - schemaName?: (string|null); - - /** OracleSchema oracleTables */ - oracleTables?: (google.cloud.datastream.v1alpha1.IOracleTable[]|null); - } - - /** Represents an OracleSchema. */ - class OracleSchema implements IOracleSchema { - - /** - * Constructs a new OracleSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleSchema); - - /** OracleSchema schemaName. */ - public schemaName: string; - - /** OracleSchema oracleTables. */ - public oracleTables: google.cloud.datastream.v1alpha1.IOracleTable[]; - - /** - * Creates a new OracleSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleSchema instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleSchema): google.cloud.datastream.v1alpha1.OracleSchema; - - /** - * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSchema.verify|verify} messages. - * @param message OracleSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSchema.verify|verify} messages. - * @param message OracleSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleSchema - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleSchema; - - /** - * Decodes an OracleSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleSchema - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleSchema; - - /** - * Verifies an OracleSchema message. - * @param message Plain 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 OracleSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleSchema; - - /** - * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. - * @param message OracleSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleRdbms. */ - interface IOracleRdbms { - - /** OracleRdbms oracleSchemas */ - oracleSchemas?: (google.cloud.datastream.v1alpha1.IOracleSchema[]|null); - } - - /** Represents an OracleRdbms. */ - class OracleRdbms implements IOracleRdbms { - - /** - * Constructs a new OracleRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleRdbms); - - /** OracleRdbms oracleSchemas. */ - public oracleSchemas: google.cloud.datastream.v1alpha1.IOracleSchema[]; - - /** - * Creates a new OracleRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleRdbms): google.cloud.datastream.v1alpha1.OracleRdbms; - - /** - * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleRdbms.verify|verify} messages. - * @param message OracleRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleRdbms.verify|verify} messages. - * @param message OracleRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleRdbms - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleRdbms; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleRdbms - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleRdbms; - - /** - * Verifies an OracleRdbms message. - * @param message Plain 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 OracleRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleRdbms; - - /** - * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. - * @param message OracleRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OracleSourceConfig. */ - interface IOracleSourceConfig { - - /** OracleSourceConfig allowlist */ - allowlist?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** OracleSourceConfig rejectlist */ - rejectlist?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - } - - /** Represents an OracleSourceConfig. */ - class OracleSourceConfig implements IOracleSourceConfig { - - /** - * Constructs a new OracleSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IOracleSourceConfig); - - /** OracleSourceConfig allowlist. */ - public allowlist?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** OracleSourceConfig rejectlist. */ - public rejectlist?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** - * Creates a new OracleSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IOracleSourceConfig): google.cloud.datastream.v1alpha1.OracleSourceConfig; - - /** - * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSourceConfig.verify|verify} messages. - * @param message OracleSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IOracleSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSourceConfig.verify|verify} messages. - * @param message OracleSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IOracleSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.OracleSourceConfig; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleSourceConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.OracleSourceConfig; - - /** - * Verifies an OracleSourceConfig message. - * @param message Plain 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 OracleSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.OracleSourceConfig; - - /** - * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. - * @param message OracleSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.OracleSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlColumn. */ - interface IMysqlColumn { - - /** MysqlColumn columnName */ - columnName?: (string|null); - - /** MysqlColumn dataType */ - dataType?: (string|null); - - /** MysqlColumn length */ - length?: (number|null); - - /** MysqlColumn collation */ - collation?: (string|null); - - /** MysqlColumn primaryKey */ - primaryKey?: (boolean|null); - - /** MysqlColumn nullable */ - nullable?: (boolean|null); - - /** MysqlColumn ordinalPosition */ - ordinalPosition?: (number|null); - } - - /** Represents a MysqlColumn. */ - class MysqlColumn implements IMysqlColumn { - - /** - * Constructs a new MysqlColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlColumn); - - /** MysqlColumn columnName. */ - public columnName: string; - - /** MysqlColumn dataType. */ - public dataType: string; - - /** MysqlColumn length. */ - public length: number; - - /** MysqlColumn collation. */ - public collation: string; - - /** MysqlColumn primaryKey. */ - public primaryKey: boolean; - - /** MysqlColumn nullable. */ - public nullable: boolean; - - /** MysqlColumn ordinalPosition. */ - public ordinalPosition: number; - - /** - * Creates a new MysqlColumn instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlColumn instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlColumn): google.cloud.datastream.v1alpha1.MysqlColumn; - - /** - * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlColumn - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlColumn; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlColumn - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlColumn; - - /** - * Verifies a MysqlColumn message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlColumn - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlColumn; - - /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @param message MysqlColumn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlColumn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlColumn - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlTable. */ - interface IMysqlTable { - - /** MysqlTable tableName */ - tableName?: (string|null); - - /** MysqlTable mysqlColumns */ - mysqlColumns?: (google.cloud.datastream.v1alpha1.IMysqlColumn[]|null); - } - - /** Represents a MysqlTable. */ - class MysqlTable implements IMysqlTable { - - /** - * Constructs a new MysqlTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlTable); - - /** MysqlTable tableName. */ - public tableName: string; - - /** MysqlTable mysqlColumns. */ - public mysqlColumns: google.cloud.datastream.v1alpha1.IMysqlColumn[]; - - /** - * Creates a new MysqlTable instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlTable instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlTable): google.cloud.datastream.v1alpha1.MysqlTable; - - /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlTable - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlTable; - - /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlTable - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlTable; - - /** - * Verifies a MysqlTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlTable; - - /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. - * @param message MysqlTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlDatabase. */ - interface IMysqlDatabase { - - /** MysqlDatabase databaseName */ - databaseName?: (string|null); - - /** MysqlDatabase mysqlTables */ - mysqlTables?: (google.cloud.datastream.v1alpha1.IMysqlTable[]|null); - } - - /** Represents a MysqlDatabase. */ - class MysqlDatabase implements IMysqlDatabase { - - /** - * Constructs a new MysqlDatabase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlDatabase); - - /** MysqlDatabase databaseName. */ - public databaseName: string; - - /** MysqlDatabase mysqlTables. */ - public mysqlTables: google.cloud.datastream.v1alpha1.IMysqlTable[]; - - /** - * Creates a new MysqlDatabase instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlDatabase instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlDatabase): google.cloud.datastream.v1alpha1.MysqlDatabase; - - /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlDatabase - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlDatabase; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlDatabase - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlDatabase; - - /** - * Verifies a MysqlDatabase message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlDatabase - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlDatabase; - - /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. - * @param message MysqlDatabase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlDatabase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlDatabase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlDatabase - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlRdbms. */ - interface IMysqlRdbms { - - /** MysqlRdbms mysqlDatabases */ - mysqlDatabases?: (google.cloud.datastream.v1alpha1.IMysqlDatabase[]|null); - } - - /** Represents a MysqlRdbms. */ - class MysqlRdbms implements IMysqlRdbms { - - /** - * Constructs a new MysqlRdbms. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlRdbms); - - /** MysqlRdbms mysqlDatabases. */ - public mysqlDatabases: google.cloud.datastream.v1alpha1.IMysqlDatabase[]; - - /** - * Creates a new MysqlRdbms instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlRdbms instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlRdbms): google.cloud.datastream.v1alpha1.MysqlRdbms; - - /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlRdbms - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlRdbms; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlRdbms - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlRdbms; - - /** - * Verifies a MysqlRdbms message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlRdbms - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlRdbms; - - /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. - * @param message MysqlRdbms - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlRdbms to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlRdbms - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MysqlSourceConfig. */ - interface IMysqlSourceConfig { - - /** MysqlSourceConfig allowlist */ - allowlist?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** MysqlSourceConfig rejectlist */ - rejectlist?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - } - - /** Represents a MysqlSourceConfig. */ - class MysqlSourceConfig implements IMysqlSourceConfig { - - /** - * Constructs a new MysqlSourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IMysqlSourceConfig); - - /** MysqlSourceConfig allowlist. */ - public allowlist?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** MysqlSourceConfig rejectlist. */ - public rejectlist?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** - * Creates a new MysqlSourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MysqlSourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IMysqlSourceConfig): google.cloud.datastream.v1alpha1.MysqlSourceConfig; - - /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MysqlSourceConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.MysqlSourceConfig; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MysqlSourceConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.MysqlSourceConfig; - - /** - * Verifies a MysqlSourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MysqlSourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.MysqlSourceConfig; - - /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. - * @param message MysqlSourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.MysqlSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MysqlSourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MysqlSourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SourceConfig. */ - interface ISourceConfig { - - /** SourceConfig sourceConnectionProfileName */ - sourceConnectionProfileName?: (string|null); - - /** SourceConfig oracleSourceConfig */ - oracleSourceConfig?: (google.cloud.datastream.v1alpha1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig */ - mysqlSourceConfig?: (google.cloud.datastream.v1alpha1.IMysqlSourceConfig|null); - } - - /** Represents a SourceConfig. */ - class SourceConfig implements ISourceConfig { - - /** - * Constructs a new SourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.ISourceConfig); - - /** SourceConfig sourceConnectionProfileName. */ - public sourceConnectionProfileName: string; - - /** SourceConfig oracleSourceConfig. */ - public oracleSourceConfig?: (google.cloud.datastream.v1alpha1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig. */ - public mysqlSourceConfig?: (google.cloud.datastream.v1alpha1.IMysqlSourceConfig|null); - - /** SourceConfig sourceStreamConfig. */ - public sourceStreamConfig?: ("oracleSourceConfig"|"mysqlSourceConfig"); - - /** - * Creates a new SourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.ISourceConfig): google.cloud.datastream.v1alpha1.SourceConfig; - - /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.SourceConfig; - - /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.SourceConfig; - - /** - * Verifies a SourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.SourceConfig; - - /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. - * @param message SourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.SourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AvroFileFormat. */ - interface IAvroFileFormat { - } - - /** Represents an AvroFileFormat. */ - class AvroFileFormat implements IAvroFileFormat { - - /** - * Constructs a new AvroFileFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IAvroFileFormat); - - /** - * Creates a new AvroFileFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroFileFormat instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IAvroFileFormat): google.cloud.datastream.v1alpha1.AvroFileFormat; - - /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1alpha1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroFileFormat - * @throws {Error} If the payload is not 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.datastream.v1alpha1.AvroFileFormat; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroFileFormat - * @throws {Error} If the payload 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.datastream.v1alpha1.AvroFileFormat; - - /** - * Verifies an AvroFileFormat message. - * @param message Plain 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 AvroFileFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroFileFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.AvroFileFormat; - - /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. - * @param message AvroFileFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.AvroFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroFileFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroFileFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** GcsFileFormat enum. */ - enum GcsFileFormat { - GCS_FILE_FORMAT_UNSPECIFIED = 0, - AVRO = 1 - } - - /** SchemaFileFormat enum. */ - enum SchemaFileFormat { - SCHEMA_FILE_FORMAT_UNSPECIFIED = 0, - NO_SCHEMA_FILE = 1, - AVRO_SCHEMA_FILE = 2 - } - - /** Properties of a JsonFileFormat. */ - interface IJsonFileFormat { - - /** JsonFileFormat schemaFileFormat */ - schemaFileFormat?: (google.cloud.datastream.v1alpha1.SchemaFileFormat|keyof typeof google.cloud.datastream.v1alpha1.SchemaFileFormat|null); - - /** JsonFileFormat compression */ - compression?: (google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression|null); - } - - /** Represents a JsonFileFormat. */ - class JsonFileFormat implements IJsonFileFormat { - - /** - * Constructs a new JsonFileFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IJsonFileFormat); - - /** JsonFileFormat schemaFileFormat. */ - public schemaFileFormat: (google.cloud.datastream.v1alpha1.SchemaFileFormat|keyof typeof google.cloud.datastream.v1alpha1.SchemaFileFormat); - - /** JsonFileFormat compression. */ - public compression: (google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression); - - /** - * Creates a new JsonFileFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonFileFormat instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IJsonFileFormat): google.cloud.datastream.v1alpha1.JsonFileFormat; - - /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1alpha1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonFileFormat - * @throws {Error} If the payload is not 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.datastream.v1alpha1.JsonFileFormat; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonFileFormat - * @throws {Error} If the payload 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.datastream.v1alpha1.JsonFileFormat; - - /** - * Verifies a JsonFileFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonFileFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.JsonFileFormat; - - /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. - * @param message JsonFileFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.JsonFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonFileFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonFileFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace JsonFileFormat { - - /** JsonCompression enum. */ - enum JsonCompression { - JSON_COMPRESSION_UNSPECIFIED = 0, - NO_COMPRESSION = 1, - GZIP = 2 - } - } - - /** Properties of a GcsDestinationConfig. */ - interface IGcsDestinationConfig { - - /** GcsDestinationConfig path */ - path?: (string|null); - - /** GcsDestinationConfig gcsFileFormat */ - gcsFileFormat?: (google.cloud.datastream.v1alpha1.GcsFileFormat|keyof typeof google.cloud.datastream.v1alpha1.GcsFileFormat|null); - - /** GcsDestinationConfig fileRotationMb */ - fileRotationMb?: (number|null); - - /** GcsDestinationConfig fileRotationInterval */ - fileRotationInterval?: (google.protobuf.IDuration|null); - - /** GcsDestinationConfig avroFileFormat */ - avroFileFormat?: (google.cloud.datastream.v1alpha1.IAvroFileFormat|null); - - /** GcsDestinationConfig jsonFileFormat */ - jsonFileFormat?: (google.cloud.datastream.v1alpha1.IJsonFileFormat|null); - } - - /** Represents a GcsDestinationConfig. */ - class GcsDestinationConfig implements IGcsDestinationConfig { - - /** - * Constructs a new GcsDestinationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IGcsDestinationConfig); - - /** GcsDestinationConfig path. */ - public path: string; - - /** GcsDestinationConfig gcsFileFormat. */ - public gcsFileFormat: (google.cloud.datastream.v1alpha1.GcsFileFormat|keyof typeof google.cloud.datastream.v1alpha1.GcsFileFormat); - - /** GcsDestinationConfig fileRotationMb. */ - public fileRotationMb: number; - - /** GcsDestinationConfig fileRotationInterval. */ - public fileRotationInterval?: (google.protobuf.IDuration|null); - - /** GcsDestinationConfig avroFileFormat. */ - public avroFileFormat?: (google.cloud.datastream.v1alpha1.IAvroFileFormat|null); - - /** GcsDestinationConfig jsonFileFormat. */ - public jsonFileFormat?: (google.cloud.datastream.v1alpha1.IJsonFileFormat|null); - - /** GcsDestinationConfig fileFormat. */ - public fileFormat?: ("avroFileFormat"|"jsonFileFormat"); - - /** - * Creates a new GcsDestinationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsDestinationConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IGcsDestinationConfig): google.cloud.datastream.v1alpha1.GcsDestinationConfig; - - /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsDestinationConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.GcsDestinationConfig; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsDestinationConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.GcsDestinationConfig; - - /** - * Verifies a GcsDestinationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsDestinationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.GcsDestinationConfig; - - /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. - * @param message GcsDestinationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.GcsDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsDestinationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsDestinationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DestinationConfig. */ - interface IDestinationConfig { - - /** DestinationConfig destinationConnectionProfileName */ - destinationConnectionProfileName?: (string|null); - - /** DestinationConfig gcsDestinationConfig */ - gcsDestinationConfig?: (google.cloud.datastream.v1alpha1.IGcsDestinationConfig|null); - } - - /** Represents a DestinationConfig. */ - class DestinationConfig implements IDestinationConfig { - - /** - * Constructs a new DestinationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IDestinationConfig); - - /** DestinationConfig destinationConnectionProfileName. */ - public destinationConnectionProfileName: string; - - /** DestinationConfig gcsDestinationConfig. */ - public gcsDestinationConfig?: (google.cloud.datastream.v1alpha1.IGcsDestinationConfig|null); - - /** DestinationConfig destinationStreamConfig. */ - public destinationStreamConfig?: "gcsDestinationConfig"; - - /** - * Creates a new DestinationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DestinationConfig instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IDestinationConfig): google.cloud.datastream.v1alpha1.DestinationConfig; - - /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DestinationConfig - * @throws {Error} If the payload is not 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.datastream.v1alpha1.DestinationConfig; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestinationConfig - * @throws {Error} If the payload 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.datastream.v1alpha1.DestinationConfig; - - /** - * Verifies a DestinationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DestinationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.DestinationConfig; - - /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. - * @param message DestinationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.DestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DestinationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DestinationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Stream. */ - interface IStream { - - /** Stream name */ - name?: (string|null); - - /** Stream createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels */ - labels?: ({ [k: string]: string }|null); - - /** Stream displayName */ - displayName?: (string|null); - - /** Stream sourceConfig */ - sourceConfig?: (google.cloud.datastream.v1alpha1.ISourceConfig|null); - - /** Stream destinationConfig */ - destinationConfig?: (google.cloud.datastream.v1alpha1.IDestinationConfig|null); - - /** Stream state */ - state?: (google.cloud.datastream.v1alpha1.Stream.State|keyof typeof google.cloud.datastream.v1alpha1.Stream.State|null); - - /** Stream backfillAll */ - backfillAll?: (google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone */ - backfillNone?: (google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors */ - errors?: (google.cloud.datastream.v1alpha1.IError[]|null); - } - - /** Represents a Stream. */ - class Stream implements IStream { - - /** - * Constructs a new Stream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IStream); - - /** Stream name. */ - public name: string; - - /** Stream createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels. */ - public labels: { [k: string]: string }; - - /** Stream displayName. */ - public displayName: string; - - /** Stream sourceConfig. */ - public sourceConfig?: (google.cloud.datastream.v1alpha1.ISourceConfig|null); - - /** Stream destinationConfig. */ - public destinationConfig?: (google.cloud.datastream.v1alpha1.IDestinationConfig|null); - - /** Stream state. */ - public state: (google.cloud.datastream.v1alpha1.Stream.State|keyof typeof google.cloud.datastream.v1alpha1.Stream.State); - - /** Stream backfillAll. */ - public backfillAll?: (google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone. */ - public backfillNone?: (google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors. */ - public errors: google.cloud.datastream.v1alpha1.IError[]; - - /** Stream backfillStrategy. */ - public backfillStrategy?: ("backfillAll"|"backfillNone"); - - /** - * Creates a new Stream instance using the specified properties. - * @param [properties] Properties to set - * @returns Stream instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IStream): google.cloud.datastream.v1alpha1.Stream; - - /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stream - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Stream; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stream - * @throws {Error} If the payload 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.datastream.v1alpha1.Stream; - - /** - * Verifies a Stream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Stream; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @param message Stream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Stream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Stream - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Stream { - - /** Properties of a BackfillAllStrategy. */ - interface IBackfillAllStrategy { - - /** BackfillAllStrategy oracleExcludedObjects */ - oracleExcludedObjects?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** BackfillAllStrategy mysqlExcludedObjects */ - mysqlExcludedObjects?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - } - - /** Represents a BackfillAllStrategy. */ - class BackfillAllStrategy implements IBackfillAllStrategy { - - /** - * Constructs a new BackfillAllStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy); - - /** BackfillAllStrategy oracleExcludedObjects. */ - public oracleExcludedObjects?: (google.cloud.datastream.v1alpha1.IOracleRdbms|null); - - /** BackfillAllStrategy mysqlExcludedObjects. */ - public mysqlExcludedObjects?: (google.cloud.datastream.v1alpha1.IMysqlRdbms|null); - - /** BackfillAllStrategy excludedObjects. */ - public excludedObjects?: ("oracleExcludedObjects"|"mysqlExcludedObjects"); - - /** - * Creates a new BackfillAllStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillAllStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy): google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy; - - /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillAllStrategy - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Stream.BackfillAllStrategy; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillAllStrategy - * @throws {Error} If the payload 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.datastream.v1alpha1.Stream.BackfillAllStrategy; - - /** - * Verifies a BackfillAllStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillAllStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy; - - /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. - * @param message BackfillAllStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillAllStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillAllStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackfillNoneStrategy. */ - interface IBackfillNoneStrategy { - } - - /** Represents a BackfillNoneStrategy. */ - class BackfillNoneStrategy implements IBackfillNoneStrategy { - - /** - * Constructs a new BackfillNoneStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy); - - /** - * Creates a new BackfillNoneStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillNoneStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy): google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy; - - /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillNoneStrategy - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Stream.BackfillNoneStrategy; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillNoneStrategy - * @throws {Error} If the payload 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.datastream.v1alpha1.Stream.BackfillNoneStrategy; - - /** - * Verifies a BackfillNoneStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillNoneStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy; - - /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. - * @param message BackfillNoneStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillNoneStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackfillNoneStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATED = 1, - RUNNING = 2, - PAUSED = 3, - MAINTENANCE = 4, - FAILED = 5, - FAILED_PERMANENTLY = 6, - STARTING = 7, - DRAINING = 8 - } - } - - /** Properties of an Error. */ - interface IError { - - /** Error reason */ - reason?: (string|null); - - /** Error errorUuid */ - errorUuid?: (string|null); - - /** Error message */ - message?: (string|null); - - /** Error errorTime */ - errorTime?: (google.protobuf.ITimestamp|null); - - /** Error details */ - details?: ({ [k: string]: string }|null); - } - - /** Represents an Error. */ - class Error implements IError { - - /** - * Constructs a new Error. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IError); - - /** Error reason. */ - public reason: string; - - /** Error errorUuid. */ - public errorUuid: string; - - /** Error message. */ - public message: string; - - /** Error errorTime. */ - public errorTime?: (google.protobuf.ITimestamp|null); - - /** Error details. */ - public details: { [k: string]: string }; - - /** - * Creates a new Error instance using the specified properties. - * @param [properties] Properties to set - * @returns Error instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IError): google.cloud.datastream.v1alpha1.Error; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Error message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Error - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Error; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Error - * @throws {Error} If the payload 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.datastream.v1alpha1.Error; - - /** - * Verifies an Error message. - * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Error - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Error; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @param message Error - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Error to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Error - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidationResult. */ - interface IValidationResult { - - /** ValidationResult validations */ - validations?: (google.cloud.datastream.v1alpha1.IValidation[]|null); - } - - /** Represents a ValidationResult. */ - class ValidationResult implements IValidationResult { - - /** - * Constructs a new ValidationResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IValidationResult); - - /** ValidationResult validations. */ - public validations: google.cloud.datastream.v1alpha1.IValidation[]; - - /** - * Creates a new ValidationResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidationResult instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IValidationResult): google.cloud.datastream.v1alpha1.ValidationResult; - - /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidationResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidationResult - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ValidationResult; - - /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidationResult - * @throws {Error} If the payload 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.datastream.v1alpha1.ValidationResult; - - /** - * Verifies a ValidationResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidationResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ValidationResult; - - /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @param message ValidationResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidationResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidationResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Validation. */ - interface IValidation { - - /** Validation description */ - description?: (string|null); - - /** Validation status */ - status?: (google.cloud.datastream.v1alpha1.Validation.Status|keyof typeof google.cloud.datastream.v1alpha1.Validation.Status|null); - - /** Validation message */ - message?: (google.cloud.datastream.v1alpha1.IValidationMessage[]|null); - - /** Validation code */ - code?: (string|null); - } - - /** Represents a Validation. */ - class Validation implements IValidation { - - /** - * Constructs a new Validation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IValidation); - - /** Validation description. */ - public description: string; - - /** Validation status. */ - public status: (google.cloud.datastream.v1alpha1.Validation.Status|keyof typeof google.cloud.datastream.v1alpha1.Validation.Status); - - /** Validation message. */ - public message: google.cloud.datastream.v1alpha1.IValidationMessage[]; - - /** Validation code. */ - public code: string; - - /** - * Creates a new Validation instance using the specified properties. - * @param [properties] Properties to set - * @returns Validation instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IValidation): google.cloud.datastream.v1alpha1.Validation; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Validation - * @throws {Error} If the payload is not 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.datastream.v1alpha1.Validation; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Validation - * @throws {Error} If the payload 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.datastream.v1alpha1.Validation; - - /** - * Verifies a Validation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.Validation; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @param message Validation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Validation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Validation { - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - NOT_EXECUTED = 1, - FAILED = 2, - PASSED = 3 - } - } - - /** Properties of a ValidationMessage. */ - interface IValidationMessage { - - /** ValidationMessage message */ - message?: (string|null); - - /** ValidationMessage level */ - level?: (google.cloud.datastream.v1alpha1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1alpha1.ValidationMessage.Level|null); - - /** ValidationMessage metadata */ - metadata?: ({ [k: string]: string }|null); - - /** ValidationMessage code */ - code?: (string|null); - } - - /** Represents a ValidationMessage. */ - class ValidationMessage implements IValidationMessage { - - /** - * Constructs a new ValidationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1alpha1.IValidationMessage); - - /** ValidationMessage message. */ - public message: string; - - /** ValidationMessage level. */ - public level: (google.cloud.datastream.v1alpha1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1alpha1.ValidationMessage.Level); - - /** ValidationMessage metadata. */ - public metadata: { [k: string]: string }; - - /** ValidationMessage code. */ - public code: string; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidationMessage instance - */ - public static create(properties?: google.cloud.datastream.v1alpha1.IValidationMessage): google.cloud.datastream.v1alpha1.ValidationMessage; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1alpha1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1alpha1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidationMessage - * @throws {Error} If the payload is not 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.datastream.v1alpha1.ValidationMessage; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidationMessage - * @throws {Error} If the payload 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.datastream.v1alpha1.ValidationMessage; - - /** - * Verifies a ValidationMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidationMessage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1alpha1.ValidationMessage; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @param message ValidationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1alpha1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidationMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidationMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ValidationMessage { - - /** Level enum. */ - enum Level { - LEVEL_UNSPECIFIED = 0, - WARNING = 1, - ERROR = 2 - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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); - } - - /** 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[]; - - /** - * 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); - } - - /** 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); - - /** - * 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; - } - - /** 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); - } - - /** 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); - - /** - * 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 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** 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; - } - } - - /** 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_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 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 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); - } - - /** 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[]; - - /** - * 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); - } - - /** 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[]; - - /** - * 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 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 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 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 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 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); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|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|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|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); - } - - /** 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); - - /** - * 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 - } - } - - /** 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 features */ - features?: (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 features. */ - public features?: (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 - } - } - } - - /** 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 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 Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|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|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 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 longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations 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 Operations 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): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain 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 Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain 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 OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @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 a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not 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.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload 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.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @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-datastream/v1alpha1/protos/protos.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.js deleted file mode 100644 index 564b414430b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.js +++ /dev/null @@ -1,39968 +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. - -/*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_datastream_protos || ($protobuf.roots._google_cloud_datastream_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.datastream = (function() { - - /** - * Namespace datastream. - * @memberof google.cloud - * @namespace - */ - var datastream = {}; - - datastream.v1alpha1 = (function() { - - /** - * Namespace v1alpha1. - * @memberof google.cloud.datastream - * @namespace - */ - var v1alpha1 = {}; - - v1alpha1.Datastream = (function() { - - /** - * Constructs a new Datastream service. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a Datastream - * @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 Datastream(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Datastream.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Datastream; - - /** - * Creates new Datastream service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @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 {Datastream} RPC service. Useful where requests and/or responses are streamed. - */ - Datastream.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listConnectionProfiles}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef ListConnectionProfilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} [response] ListConnectionProfilesResponse - */ - - /** - * Calls ListConnectionProfiles. - * @function listConnectionProfiles - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest} request ListConnectionProfilesRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfilesCallback} callback Node-style callback called with the error, if any, and ListConnectionProfilesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listConnectionProfiles = function listConnectionProfiles(request, callback) { - return this.rpcCall(listConnectionProfiles, $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest, $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse, request, callback); - }, "name", { value: "ListConnectionProfiles" }); - - /** - * Calls ListConnectionProfiles. - * @function listConnectionProfiles - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest} request ListConnectionProfilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getConnectionProfile}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef GetConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.ConnectionProfile} [response] ConnectionProfile - */ - - /** - * Calls GetConnectionProfile. - * @function getConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest} request GetConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfileCallback} callback Node-style callback called with the error, if any, and ConnectionProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getConnectionProfile = function getConnectionProfile(request, callback) { - return this.rpcCall(getConnectionProfile, $root.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest, $root.google.cloud.datastream.v1alpha1.ConnectionProfile, request, callback); - }, "name", { value: "GetConnectionProfile" }); - - /** - * Calls GetConnectionProfile. - * @function getConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest} request GetConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createConnectionProfile}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef CreateConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectionProfile. - * @function createConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest} request CreateConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createConnectionProfile = function createConnectionProfile(request, callback) { - return this.rpcCall(createConnectionProfile, $root.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectionProfile" }); - - /** - * Calls CreateConnectionProfile. - * @function createConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest} request CreateConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|updateConnectionProfile}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef UpdateConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectionProfile. - * @function updateConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest} request UpdateConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.updateConnectionProfile = function updateConnectionProfile(request, callback) { - return this.rpcCall(updateConnectionProfile, $root.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectionProfile" }); - - /** - * Calls UpdateConnectionProfile. - * @function updateConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest} request UpdateConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteConnectionProfile}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef DeleteConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectionProfile. - * @function deleteConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest} request DeleteConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteConnectionProfile = function deleteConnectionProfile(request, callback) { - return this.rpcCall(deleteConnectionProfile, $root.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectionProfile" }); - - /** - * Calls DeleteConnectionProfile. - * @function deleteConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest} request DeleteConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|discoverConnectionProfile}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef DiscoverConnectionProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} [response] DiscoverConnectionProfileResponse - */ - - /** - * Calls DiscoverConnectionProfile. - * @function discoverConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest} request DiscoverConnectionProfileRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfileCallback} callback Node-style callback called with the error, if any, and DiscoverConnectionProfileResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.discoverConnectionProfile = function discoverConnectionProfile(request, callback) { - return this.rpcCall(discoverConnectionProfile, $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest, $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse, request, callback); - }, "name", { value: "DiscoverConnectionProfile" }); - - /** - * Calls DiscoverConnectionProfile. - * @function discoverConnectionProfile - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest} request DiscoverConnectionProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listStreams}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef ListStreamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.ListStreamsResponse} [response] ListStreamsResponse - */ - - /** - * Calls ListStreams. - * @function listStreams - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest} request ListStreamsRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.ListStreamsCallback} callback Node-style callback called with the error, if any, and ListStreamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listStreams = function listStreams(request, callback) { - return this.rpcCall(listStreams, $root.google.cloud.datastream.v1alpha1.ListStreamsRequest, $root.google.cloud.datastream.v1alpha1.ListStreamsResponse, request, callback); - }, "name", { value: "ListStreams" }); - - /** - * Calls ListStreams. - * @function listStreams - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest} request ListStreamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getStream}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef GetStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.Stream} [response] Stream - */ - - /** - * Calls GetStream. - * @function getStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest} request GetStreamRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.GetStreamCallback} callback Node-style callback called with the error, if any, and Stream - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getStream = function getStream(request, callback) { - return this.rpcCall(getStream, $root.google.cloud.datastream.v1alpha1.GetStreamRequest, $root.google.cloud.datastream.v1alpha1.Stream, request, callback); - }, "name", { value: "GetStream" }); - - /** - * Calls GetStream. - * @function getStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest} request GetStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createStream}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef CreateStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateStream. - * @function createStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest} request CreateStreamRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.CreateStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createStream = function createStream(request, callback) { - return this.rpcCall(createStream, $root.google.cloud.datastream.v1alpha1.CreateStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateStream" }); - - /** - * Calls CreateStream. - * @function createStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest} request CreateStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|updateStream}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef UpdateStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateStream. - * @function updateStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest} request UpdateStreamRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.UpdateStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.updateStream = function updateStream(request, callback) { - return this.rpcCall(updateStream, $root.google.cloud.datastream.v1alpha1.UpdateStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateStream" }); - - /** - * Calls UpdateStream. - * @function updateStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest} request UpdateStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteStream}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef DeleteStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteStream. - * @function deleteStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest} request DeleteStreamRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.DeleteStreamCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteStream = function deleteStream(request, callback) { - return this.rpcCall(deleteStream, $root.google.cloud.datastream.v1alpha1.DeleteStreamRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteStream" }); - - /** - * Calls DeleteStream. - * @function deleteStream - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest} request DeleteStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|fetchErrors}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef FetchErrorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls FetchErrors. - * @function fetchErrors - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest} request FetchErrorsRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.FetchErrorsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.fetchErrors = function fetchErrors(request, callback) { - return this.rpcCall(fetchErrors, $root.google.cloud.datastream.v1alpha1.FetchErrorsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "FetchErrors" }); - - /** - * Calls FetchErrors. - * @function fetchErrors - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest} request FetchErrorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|fetchStaticIps}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef FetchStaticIpsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} [response] FetchStaticIpsResponse - */ - - /** - * Calls FetchStaticIps. - * @function fetchStaticIps - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.FetchStaticIpsCallback} callback Node-style callback called with the error, if any, and FetchStaticIpsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.fetchStaticIps = function fetchStaticIps(request, callback) { - return this.rpcCall(fetchStaticIps, $root.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest, $root.google.cloud.datastream.v1alpha1.FetchStaticIpsResponse, request, callback); - }, "name", { value: "FetchStaticIps" }); - - /** - * Calls FetchStaticIps. - * @function fetchStaticIps - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createPrivateConnection}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef CreatePrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreatePrivateConnection. - * @function createPrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createPrivateConnection = function createPrivateConnection(request, callback) { - return this.rpcCall(createPrivateConnection, $root.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreatePrivateConnection" }); - - /** - * Calls CreatePrivateConnection. - * @function createPrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getPrivateConnection}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef GetPrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.PrivateConnection} [response] PrivateConnection - */ - - /** - * Calls GetPrivateConnection. - * @function getPrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnectionCallback} callback Node-style callback called with the error, if any, and PrivateConnection - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getPrivateConnection = function getPrivateConnection(request, callback) { - return this.rpcCall(getPrivateConnection, $root.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest, $root.google.cloud.datastream.v1alpha1.PrivateConnection, request, callback); - }, "name", { value: "GetPrivateConnection" }); - - /** - * Calls GetPrivateConnection. - * @function getPrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listPrivateConnections}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef ListPrivateConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} [response] ListPrivateConnectionsResponse - */ - - /** - * Calls ListPrivateConnections. - * @function listPrivateConnections - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnectionsCallback} callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listPrivateConnections = function listPrivateConnections(request, callback) { - return this.rpcCall(listPrivateConnections, $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest, $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse, request, callback); - }, "name", { value: "ListPrivateConnections" }); - - /** - * Calls ListPrivateConnections. - * @function listPrivateConnections - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deletePrivateConnection}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef DeletePrivateConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeletePrivateConnection. - * @function deletePrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deletePrivateConnection = function deletePrivateConnection(request, callback) { - return this.rpcCall(deletePrivateConnection, $root.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeletePrivateConnection" }); - - /** - * Calls DeletePrivateConnection. - * @function deletePrivateConnection - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|createRoute}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef CreateRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateRoute. - * @function createRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest} request CreateRouteRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.CreateRouteCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.createRoute = function createRoute(request, callback) { - return this.rpcCall(createRoute, $root.google.cloud.datastream.v1alpha1.CreateRouteRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRoute" }); - - /** - * Calls CreateRoute. - * @function createRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest} request CreateRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|getRoute}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef GetRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.Route} [response] Route - */ - - /** - * Calls GetRoute. - * @function getRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest} request GetRouteRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.GetRouteCallback} callback Node-style callback called with the error, if any, and Route - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.getRoute = function getRoute(request, callback) { - return this.rpcCall(getRoute, $root.google.cloud.datastream.v1alpha1.GetRouteRequest, $root.google.cloud.datastream.v1alpha1.Route, request, callback); - }, "name", { value: "GetRoute" }); - - /** - * Calls GetRoute. - * @function getRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest} request GetRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|listRoutes}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef ListRoutesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datastream.v1alpha1.ListRoutesResponse} [response] ListRoutesResponse - */ - - /** - * Calls ListRoutes. - * @function listRoutes - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest} request ListRoutesRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.ListRoutesCallback} callback Node-style callback called with the error, if any, and ListRoutesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.listRoutes = function listRoutes(request, callback) { - return this.rpcCall(listRoutes, $root.google.cloud.datastream.v1alpha1.ListRoutesRequest, $root.google.cloud.datastream.v1alpha1.ListRoutesResponse, request, callback); - }, "name", { value: "ListRoutes" }); - - /** - * Calls ListRoutes. - * @function listRoutes - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest} request ListRoutesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datastream.v1alpha1.Datastream|deleteRoute}. - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @typedef DeleteRouteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteRoute. - * @function deleteRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest} request DeleteRouteRequest message or plain object - * @param {google.cloud.datastream.v1alpha1.Datastream.DeleteRouteCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Datastream.prototype.deleteRoute = function deleteRoute(request, callback) { - return this.rpcCall(deleteRoute, $root.google.cloud.datastream.v1alpha1.DeleteRouteRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteRoute" }); - - /** - * Calls DeleteRoute. - * @function deleteRoute - * @memberof google.cloud.datastream.v1alpha1.Datastream - * @instance - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest} request DeleteRouteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Datastream; - })(); - - v1alpha1.DiscoverConnectionProfileRequest = (function() { - - /** - * Properties of a DiscoverConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDiscoverConnectionProfileRequest - * @property {string|null} [parent] DiscoverConnectionProfileRequest parent - * @property {google.cloud.datastream.v1alpha1.IConnectionProfile|null} [connectionProfile] DiscoverConnectionProfileRequest connectionProfile - * @property {string|null} [connectionProfileName] DiscoverConnectionProfileRequest connectionProfileName - * @property {boolean|null} [recursive] DiscoverConnectionProfileRequest recursive - * @property {number|null} [recursionDepth] DiscoverConnectionProfileRequest recursionDepth - * @property {google.cloud.datastream.v1alpha1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileRequest oracleRdbms - * @property {google.cloud.datastream.v1alpha1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileRequest mysqlRdbms - */ - - /** - * Constructs a new DiscoverConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DiscoverConnectionProfileRequest. - * @implements IDiscoverConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest=} [properties] Properties to set - */ - function DiscoverConnectionProfileRequest(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]]; - } - - /** - * DiscoverConnectionProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.parent = ""; - - /** - * DiscoverConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1alpha1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * DiscoverConnectionProfileRequest connectionProfileName. - * @member {string|null|undefined} connectionProfileName - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.connectionProfileName = null; - - /** - * DiscoverConnectionProfileRequest recursive. - * @member {boolean|null|undefined} recursive - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.recursive = null; - - /** - * DiscoverConnectionProfileRequest recursionDepth. - * @member {number|null|undefined} recursionDepth - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.recursionDepth = null; - - /** - * DiscoverConnectionProfileRequest oracleRdbms. - * @member {google.cloud.datastream.v1alpha1.IOracleRdbms|null|undefined} oracleRdbms - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.oracleRdbms = null; - - /** - * DiscoverConnectionProfileRequest mysqlRdbms. - * @member {google.cloud.datastream.v1alpha1.IMysqlRdbms|null|undefined} mysqlRdbms - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - DiscoverConnectionProfileRequest.prototype.mysqlRdbms = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverConnectionProfileRequest target. - * @member {"connectionProfile"|"connectionProfileName"|undefined} target - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["connectionProfile", "connectionProfileName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DiscoverConnectionProfileRequest depth. - * @member {"recursive"|"recursionDepth"|undefined} depth - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "depth", { - get: $util.oneOfGetter($oneOfFields = ["recursive", "recursionDepth"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DiscoverConnectionProfileRequest dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|undefined} dataObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest instance - */ - DiscoverConnectionProfileRequest.create = function create(properties) { - return new DiscoverConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileRequest.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.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recursive); - if (message.recursionDepth != null && Object.hasOwnProperty.call(message, "recursionDepth")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.recursionDepth); - if (message.oracleRdbms != null && Object.hasOwnProperty.call(message, "oracleRdbms")) - $root.google.cloud.datastream.v1alpha1.OracleRdbms.encode(message.oracleRdbms, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlRdbms != null && Object.hasOwnProperty.call(message, "mysqlRdbms")) - $root.google.cloud.datastream.v1alpha1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1alpha1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.connectionProfileName != null && Object.hasOwnProperty.call(message, "connectionProfileName")) - writer.uint32(/* id 201, wireType 2 =*/1610).string(message.connectionProfileName); - return writer; - }; - - /** - * Encodes the specified DiscoverConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 200: { - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 201: { - message.connectionProfileName = reader.string(); - break; - } - case 3: { - message.recursive = reader.bool(); - break; - } - case 4: { - message.recursionDepth = reader.int32(); - break; - } - case 100: { - message.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverConnectionProfileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - properties.target = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - } - if (message.connectionProfileName != null && message.hasOwnProperty("connectionProfileName")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.connectionProfileName)) - return "connectionProfileName: string expected"; - } - if (message.recursive != null && message.hasOwnProperty("recursive")) { - properties.depth = 1; - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - } - if (message.recursionDepth != null && message.hasOwnProperty("recursionDepth")) { - if (properties.depth === 1) - return "depth: multiple values"; - properties.depth = 1; - if (!$util.isInteger(message.recursionDepth)) - return "recursionDepth: integer expected"; - } - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.OracleRdbms.verify(message.oracleRdbms); - if (error) - return "oracleRdbms." + error; - } - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.verify(message.mysqlRdbms); - if (error) - return "mysqlRdbms." + error; - } - } - return null; - }; - - /** - * Creates a DiscoverConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest} DiscoverConnectionProfileRequest - */ - DiscoverConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.connectionProfileName != null) - message.connectionProfileName = String(object.connectionProfileName); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - if (object.recursionDepth != null) - message.recursionDepth = object.recursionDepth | 0; - if (object.oracleRdbms != null) { - if (typeof object.oracleRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.oracleRdbms: object expected"); - message.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.fromObject(object.oracleRdbms); - } - if (object.mysqlRdbms != null) { - if (typeof object.mysqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.mysqlRdbms: object expected"); - message.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.fromObject(object.mysqlRdbms); - } - return message; - }; - - /** - * Creates a plain object from a DiscoverConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest} message DiscoverConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.recursive != null && message.hasOwnProperty("recursive")) { - object.recursive = message.recursive; - if (options.oneofs) - object.depth = "recursive"; - } - if (message.recursionDepth != null && message.hasOwnProperty("recursionDepth")) { - object.recursionDepth = message.recursionDepth; - if (options.oneofs) - object.depth = "recursionDepth"; - } - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - object.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.toObject(message.oracleRdbms, options); - if (options.oneofs) - object.dataObject = "oracleRdbms"; - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - object.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.toObject(message.mysqlRdbms, options); - if (options.oneofs) - object.dataObject = "mysqlRdbms"; - } - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - object.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.toObject(message.connectionProfile, options); - if (options.oneofs) - object.target = "connectionProfile"; - } - if (message.connectionProfileName != null && message.hasOwnProperty("connectionProfileName")) { - object.connectionProfileName = message.connectionProfileName; - if (options.oneofs) - object.target = "connectionProfileName"; - } - return object; - }; - - /** - * Converts this DiscoverConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - DiscoverConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest"; - }; - - return DiscoverConnectionProfileRequest; - })(); - - v1alpha1.DiscoverConnectionProfileResponse = (function() { - - /** - * Properties of a DiscoverConnectionProfileResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDiscoverConnectionProfileResponse - * @property {google.cloud.datastream.v1alpha1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileResponse oracleRdbms - * @property {google.cloud.datastream.v1alpha1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileResponse mysqlRdbms - */ - - /** - * Constructs a new DiscoverConnectionProfileResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DiscoverConnectionProfileResponse. - * @implements IDiscoverConnectionProfileResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse=} [properties] Properties to set - */ - function DiscoverConnectionProfileResponse(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]]; - } - - /** - * DiscoverConnectionProfileResponse oracleRdbms. - * @member {google.cloud.datastream.v1alpha1.IOracleRdbms|null|undefined} oracleRdbms - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.oracleRdbms = null; - - /** - * DiscoverConnectionProfileResponse mysqlRdbms. - * @member {google.cloud.datastream.v1alpha1.IMysqlRdbms|null|undefined} mysqlRdbms - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @instance - */ - DiscoverConnectionProfileResponse.prototype.mysqlRdbms = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverConnectionProfileResponse dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|undefined} dataObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @instance - */ - Object.defineProperty(DiscoverConnectionProfileResponse.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverConnectionProfileResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse instance - */ - DiscoverConnectionProfileResponse.create = function create(properties) { - return new DiscoverConnectionProfileResponse(properties); - }; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleRdbms != null && Object.hasOwnProperty.call(message, "oracleRdbms")) - $root.google.cloud.datastream.v1alpha1.OracleRdbms.encode(message.oracleRdbms, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlRdbms != null && Object.hasOwnProperty.call(message, "mysqlRdbms")) - $root.google.cloud.datastream.v1alpha1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DiscoverConnectionProfileResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverConnectionProfileResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverConnectionProfileResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverConnectionProfileResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverConnectionProfileResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverConnectionProfileResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.OracleRdbms.verify(message.oracleRdbms); - if (error) - return "oracleRdbms." + error; - } - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - if (properties.dataObject === 1) - return "dataObject: multiple values"; - properties.dataObject = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.verify(message.mysqlRdbms); - if (error) - return "mysqlRdbms." + error; - } - } - return null; - }; - - /** - * Creates a DiscoverConnectionProfileResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} DiscoverConnectionProfileResponse - */ - DiscoverConnectionProfileResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse(); - if (object.oracleRdbms != null) { - if (typeof object.oracleRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.oracleRdbms: object expected"); - message.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.fromObject(object.oracleRdbms); - } - if (object.mysqlRdbms != null) { - if (typeof object.mysqlRdbms !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.mysqlRdbms: object expected"); - message.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.fromObject(object.mysqlRdbms); - } - return message; - }; - - /** - * Creates a plain object from a DiscoverConnectionProfileResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse} message DiscoverConnectionProfileResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverConnectionProfileResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleRdbms != null && message.hasOwnProperty("oracleRdbms")) { - object.oracleRdbms = $root.google.cloud.datastream.v1alpha1.OracleRdbms.toObject(message.oracleRdbms, options); - if (options.oneofs) - object.dataObject = "oracleRdbms"; - } - if (message.mysqlRdbms != null && message.hasOwnProperty("mysqlRdbms")) { - object.mysqlRdbms = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.toObject(message.mysqlRdbms, options); - if (options.oneofs) - object.dataObject = "mysqlRdbms"; - } - return object; - }; - - /** - * Converts this DiscoverConnectionProfileResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @instance - * @returns {Object.} JSON object - */ - DiscoverConnectionProfileResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverConnectionProfileResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverConnectionProfileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse"; - }; - - return DiscoverConnectionProfileResponse; - })(); - - v1alpha1.FetchStaticIpsRequest = (function() { - - /** - * Properties of a FetchStaticIpsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IFetchStaticIpsRequest - * @property {string|null} [name] FetchStaticIpsRequest name - * @property {number|null} [pageSize] FetchStaticIpsRequest pageSize - * @property {string|null} [pageToken] FetchStaticIpsRequest pageToken - */ - - /** - * Constructs a new FetchStaticIpsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a FetchStaticIpsRequest. - * @implements IFetchStaticIpsRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest=} [properties] Properties to set - */ - function FetchStaticIpsRequest(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]]; - } - - /** - * FetchStaticIpsRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.name = ""; - - /** - * FetchStaticIpsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.pageSize = 0; - - /** - * FetchStaticIpsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @instance - */ - FetchStaticIpsRequest.prototype.pageToken = ""; - - /** - * Creates a new FetchStaticIpsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsRequest} FetchStaticIpsRequest instance - */ - FetchStaticIpsRequest.create = function create(properties) { - return new FetchStaticIpsRequest(properties); - }; - - /** - * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsRequest} FetchStaticIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsRequest} FetchStaticIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchStaticIpsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchStaticIpsRequest.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.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 FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsRequest} FetchStaticIpsRequest - */ - FetchStaticIpsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest(); - if (object.name != null) - message.name = String(object.name); - 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 FetchStaticIpsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.FetchStaticIpsRequest} message FetchStaticIpsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchStaticIpsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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 FetchStaticIpsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchStaticIpsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchStaticIpsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchStaticIpsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.FetchStaticIpsRequest"; - }; - - return FetchStaticIpsRequest; - })(); - - v1alpha1.FetchStaticIpsResponse = (function() { - - /** - * Properties of a FetchStaticIpsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IFetchStaticIpsResponse - * @property {Array.|null} [staticIps] FetchStaticIpsResponse staticIps - * @property {string|null} [nextPageToken] FetchStaticIpsResponse nextPageToken - */ - - /** - * Constructs a new FetchStaticIpsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a FetchStaticIpsResponse. - * @implements IFetchStaticIpsResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse=} [properties] Properties to set - */ - function FetchStaticIpsResponse(properties) { - this.staticIps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchStaticIpsResponse staticIps. - * @member {Array.} staticIps - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @instance - */ - FetchStaticIpsResponse.prototype.staticIps = $util.emptyArray; - - /** - * FetchStaticIpsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @instance - */ - FetchStaticIpsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new FetchStaticIpsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} FetchStaticIpsResponse instance - */ - FetchStaticIpsResponse.create = function create(properties) { - return new FetchStaticIpsResponse(properties); - }; - - /** - * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.staticIps != null && message.staticIps.length) - for (var i = 0; i < message.staticIps.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.staticIps[i]); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchStaticIpsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchStaticIpsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} FetchStaticIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.FetchStaticIpsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.staticIps && message.staticIps.length)) - message.staticIps = []; - message.staticIps.push(reader.string()); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} FetchStaticIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchStaticIpsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchStaticIpsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchStaticIpsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.staticIps != null && message.hasOwnProperty("staticIps")) { - if (!Array.isArray(message.staticIps)) - return "staticIps: array expected"; - for (var i = 0; i < message.staticIps.length; ++i) - if (!$util.isString(message.staticIps[i])) - return "staticIps: string[] expected"; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} FetchStaticIpsResponse - */ - FetchStaticIpsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.FetchStaticIpsResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.FetchStaticIpsResponse(); - if (object.staticIps) { - if (!Array.isArray(object.staticIps)) - throw TypeError(".google.cloud.datastream.v1alpha1.FetchStaticIpsResponse.staticIps: array expected"); - message.staticIps = []; - for (var i = 0; i < object.staticIps.length; ++i) - message.staticIps[i] = String(object.staticIps[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.FetchStaticIpsResponse} message FetchStaticIpsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchStaticIpsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.staticIps = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.staticIps && message.staticIps.length) { - object.staticIps = []; - for (var j = 0; j < message.staticIps.length; ++j) - object.staticIps[j] = message.staticIps[j]; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this FetchStaticIpsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchStaticIpsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchStaticIpsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.FetchStaticIpsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchStaticIpsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.FetchStaticIpsResponse"; - }; - - return FetchStaticIpsResponse; - })(); - - v1alpha1.FetchErrorsRequest = (function() { - - /** - * Properties of a FetchErrorsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IFetchErrorsRequest - * @property {string|null} [stream] FetchErrorsRequest stream - */ - - /** - * Constructs a new FetchErrorsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a FetchErrorsRequest. - * @implements IFetchErrorsRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest=} [properties] Properties to set - */ - function FetchErrorsRequest(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]]; - } - - /** - * FetchErrorsRequest stream. - * @member {string} stream - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @instance - */ - FetchErrorsRequest.prototype.stream = ""; - - /** - * Creates a new FetchErrorsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsRequest} FetchErrorsRequest instance - */ - FetchErrorsRequest.create = function create(properties) { - return new FetchErrorsRequest(properties); - }; - - /** - * Encodes the specified FetchErrorsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest} message FetchErrorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchErrorsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stream != null && Object.hasOwnProperty.call(message, "stream")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stream); - return writer; - }; - - /** - * Encodes the specified FetchErrorsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsRequest} message FetchErrorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchErrorsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchErrorsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsRequest} FetchErrorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchErrorsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.FetchErrorsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.stream = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchErrorsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsRequest} FetchErrorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchErrorsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchErrorsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchErrorsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stream != null && message.hasOwnProperty("stream")) - if (!$util.isString(message.stream)) - return "stream: string expected"; - return null; - }; - - /** - * Creates a FetchErrorsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsRequest} FetchErrorsRequest - */ - FetchErrorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.FetchErrorsRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.FetchErrorsRequest(); - if (object.stream != null) - message.stream = String(object.stream); - return message; - }; - - /** - * Creates a plain object from a FetchErrorsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.FetchErrorsRequest} message FetchErrorsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchErrorsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.stream = ""; - if (message.stream != null && message.hasOwnProperty("stream")) - object.stream = message.stream; - return object; - }; - - /** - * Converts this FetchErrorsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchErrorsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchErrorsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchErrorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.FetchErrorsRequest"; - }; - - return FetchErrorsRequest; - })(); - - v1alpha1.FetchErrorsResponse = (function() { - - /** - * Properties of a FetchErrorsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IFetchErrorsResponse - * @property {Array.|null} [errors] FetchErrorsResponse errors - */ - - /** - * Constructs a new FetchErrorsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a FetchErrorsResponse. - * @implements IFetchErrorsResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsResponse=} [properties] Properties to set - */ - function FetchErrorsResponse(properties) { - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchErrorsResponse errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @instance - */ - FetchErrorsResponse.prototype.errors = $util.emptyArray; - - /** - * Creates a new FetchErrorsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsResponse} FetchErrorsResponse instance - */ - FetchErrorsResponse.create = function create(properties) { - return new FetchErrorsResponse(properties); - }; - - /** - * Encodes the specified FetchErrorsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsResponse} message FetchErrorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchErrorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1alpha1.Error.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FetchErrorsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.FetchErrorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IFetchErrorsResponse} message FetchErrorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchErrorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchErrorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsResponse} FetchErrorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchErrorsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.FetchErrorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1alpha1.Error.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchErrorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsResponse} FetchErrorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchErrorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchErrorsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchErrorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.datastream.v1alpha1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates a FetchErrorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.FetchErrorsResponse} FetchErrorsResponse - */ - FetchErrorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.FetchErrorsResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.FetchErrorsResponse(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1alpha1.FetchErrorsResponse.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.FetchErrorsResponse.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1alpha1.Error.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FetchErrorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.FetchErrorsResponse} message FetchErrorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchErrorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1alpha1.Error.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this FetchErrorsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchErrorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchErrorsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.FetchErrorsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchErrorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.FetchErrorsResponse"; - }; - - return FetchErrorsResponse; - })(); - - v1alpha1.ListConnectionProfilesRequest = (function() { - - /** - * Properties of a ListConnectionProfilesRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListConnectionProfilesRequest - * @property {string|null} [parent] ListConnectionProfilesRequest parent - * @property {number|null} [pageSize] ListConnectionProfilesRequest pageSize - * @property {string|null} [pageToken] ListConnectionProfilesRequest pageToken - * @property {string|null} [filter] ListConnectionProfilesRequest filter - * @property {string|null} [orderBy] ListConnectionProfilesRequest orderBy - */ - - /** - * Constructs a new ListConnectionProfilesRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListConnectionProfilesRequest. - * @implements IListConnectionProfilesRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest=} [properties] Properties to set - */ - function ListConnectionProfilesRequest(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]]; - } - - /** - * ListConnectionProfilesRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.parent = ""; - - /** - * ListConnectionProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.pageSize = 0; - - /** - * ListConnectionProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.pageToken = ""; - - /** - * ListConnectionProfilesRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.filter = ""; - - /** - * ListConnectionProfilesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectionProfilesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest} ListConnectionProfilesRequest instance - */ - ListConnectionProfilesRequest.create = function create(properties) { - return new ListConnectionProfilesRequest(properties); - }; - - /** - * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectionProfilesRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectionProfilesRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest} ListConnectionProfilesRequest - */ - ListConnectionProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest} message ListConnectionProfilesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectionProfilesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListConnectionProfilesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectionProfilesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectionProfilesRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectionProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest"; - }; - - return ListConnectionProfilesRequest; - })(); - - v1alpha1.ListConnectionProfilesResponse = (function() { - - /** - * Properties of a ListConnectionProfilesResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListConnectionProfilesResponse - * @property {Array.|null} [connectionProfiles] ListConnectionProfilesResponse connectionProfiles - * @property {string|null} [nextPageToken] ListConnectionProfilesResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectionProfilesResponse unreachable - */ - - /** - * Constructs a new ListConnectionProfilesResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListConnectionProfilesResponse. - * @implements IListConnectionProfilesResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse=} [properties] Properties to set - */ - function ListConnectionProfilesResponse(properties) { - this.connectionProfiles = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectionProfilesResponse connectionProfiles. - * @member {Array.} connectionProfiles - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.connectionProfiles = $util.emptyArray; - - /** - * ListConnectionProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.nextPageToken = ""; - - /** - * ListConnectionProfilesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectionProfilesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} ListConnectionProfilesResponse instance - */ - ListConnectionProfilesResponse.create = function create(properties) { - return new ListConnectionProfilesResponse(properties); - }; - - /** - * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionProfiles != null && message.connectionProfiles.length) - for (var i = 0; i < message.connectionProfiles.length; ++i) - $root.google.cloud.datastream.v1alpha1.ConnectionProfile.encode(message.connectionProfiles[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectionProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.connectionProfiles && message.connectionProfiles.length)) - message.connectionProfiles = []; - message.connectionProfiles.push($root.google.cloud.datastream.v1alpha1.ConnectionProfile.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectionProfilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectionProfilesResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectionProfilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionProfiles != null && message.hasOwnProperty("connectionProfiles")) { - if (!Array.isArray(message.connectionProfiles)) - return "connectionProfiles: array expected"; - for (var i = 0; i < message.connectionProfiles.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.verify(message.connectionProfiles[i]); - if (error) - return "connectionProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} ListConnectionProfilesResponse - */ - ListConnectionProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse(); - if (object.connectionProfiles) { - if (!Array.isArray(object.connectionProfiles)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.connectionProfiles: array expected"); - message.connectionProfiles = []; - for (var i = 0; i < object.connectionProfiles.length; ++i) { - if (typeof object.connectionProfiles[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.connectionProfiles: object expected"); - message.connectionProfiles[i] = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.fromObject(object.connectionProfiles[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse} message ListConnectionProfilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectionProfilesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.connectionProfiles = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.connectionProfiles && message.connectionProfiles.length) { - object.connectionProfiles = []; - for (var j = 0; j < message.connectionProfiles.length; ++j) - object.connectionProfiles[j] = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.toObject(message.connectionProfiles[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListConnectionProfilesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectionProfilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectionProfilesResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectionProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse"; - }; - - return ListConnectionProfilesResponse; - })(); - - v1alpha1.GetConnectionProfileRequest = (function() { - - /** - * Properties of a GetConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGetConnectionProfileRequest - * @property {string|null} [name] GetConnectionProfileRequest name - */ - - /** - * Constructs a new GetConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GetConnectionProfileRequest. - * @implements IGetConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest=} [properties] Properties to set - */ - function GetConnectionProfileRequest(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]]; - } - - /** - * GetConnectionProfileRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @instance - */ - GetConnectionProfileRequest.prototype.name = ""; - - /** - * Creates a new GetConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GetConnectionProfileRequest} GetConnectionProfileRequest instance - */ - GetConnectionProfileRequest.create = function create(properties) { - return new GetConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GetConnectionProfileRequest} GetConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GetConnectionProfileRequest} GetConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GetConnectionProfileRequest} GetConnectionProfileRequest - */ - GetConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.GetConnectionProfileRequest} message GetConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectionProfileRequest.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 GetConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GetConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GetConnectionProfileRequest"; - }; - - return GetConnectionProfileRequest; - })(); - - v1alpha1.CreateConnectionProfileRequest = (function() { - - /** - * Properties of a CreateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface ICreateConnectionProfileRequest - * @property {string|null} [parent] CreateConnectionProfileRequest parent - * @property {string|null} [connectionProfileId] CreateConnectionProfileRequest connectionProfileId - * @property {google.cloud.datastream.v1alpha1.IConnectionProfile|null} [connectionProfile] CreateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] CreateConnectionProfileRequest requestId - */ - - /** - * Constructs a new CreateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a CreateConnectionProfileRequest. - * @implements ICreateConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest=} [properties] Properties to set - */ - function CreateConnectionProfileRequest(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]]; - } - - /** - * CreateConnectionProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.parent = ""; - - /** - * CreateConnectionProfileRequest connectionProfileId. - * @member {string} connectionProfileId - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.connectionProfileId = ""; - - /** - * CreateConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1alpha1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * CreateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @instance - */ - CreateConnectionProfileRequest.prototype.requestId = ""; - - /** - * Creates a new CreateConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest} CreateConnectionProfileRequest instance - */ - CreateConnectionProfileRequest.create = function create(properties) { - return new CreateConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectionProfileRequest.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.connectionProfileId != null && Object.hasOwnProperty.call(message, "connectionProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionProfileId); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1alpha1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.connectionProfileId = reader.string(); - break; - } - case 3: { - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectionProfileRequest.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.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - if (!$util.isString(message.connectionProfileId)) - return "connectionProfileId: string expected"; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest} CreateConnectionProfileRequest - */ - CreateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.connectionProfileId != null) - message.connectionProfileId = String(object.connectionProfileId); - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest} message CreateConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.connectionProfileId = ""; - object.connectionProfile = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - object.connectionProfileId = message.connectionProfileId; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest"; - }; - - return CreateConnectionProfileRequest; - })(); - - v1alpha1.UpdateConnectionProfileRequest = (function() { - - /** - * Properties of an UpdateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IUpdateConnectionProfileRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionProfileRequest updateMask - * @property {google.cloud.datastream.v1alpha1.IConnectionProfile|null} [connectionProfile] UpdateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] UpdateConnectionProfileRequest requestId - */ - - /** - * Constructs a new UpdateConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an UpdateConnectionProfileRequest. - * @implements IUpdateConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest=} [properties] Properties to set - */ - function UpdateConnectionProfileRequest(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]]; - } - - /** - * UpdateConnectionProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.updateMask = null; - - /** - * UpdateConnectionProfileRequest connectionProfile. - * @member {google.cloud.datastream.v1alpha1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.connectionProfile = null; - - /** - * UpdateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @instance - */ - UpdateConnectionProfileRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest instance - */ - UpdateConnectionProfileRequest.create = function create(properties) { - return new UpdateConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectionProfileRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.datastream.v1alpha1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectionProfileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest - */ - UpdateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest} message UpdateConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.connectionProfile = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.datastream.v1alpha1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest"; - }; - - return UpdateConnectionProfileRequest; - })(); - - v1alpha1.DeleteConnectionProfileRequest = (function() { - - /** - * Properties of a DeleteConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDeleteConnectionProfileRequest - * @property {string|null} [name] DeleteConnectionProfileRequest name - * @property {string|null} [requestId] DeleteConnectionProfileRequest requestId - */ - - /** - * Constructs a new DeleteConnectionProfileRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DeleteConnectionProfileRequest. - * @implements IDeleteConnectionProfileRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest=} [properties] Properties to set - */ - function DeleteConnectionProfileRequest(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]]; - } - - /** - * DeleteConnectionProfileRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.name = ""; - - /** - * DeleteConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteConnectionProfileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest instance - */ - DeleteConnectionProfileRequest.create = function create(properties) { - return new DeleteConnectionProfileRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectionProfileRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectionProfileRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectionProfileRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectionProfileRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest - */ - DeleteConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest} message DeleteConnectionProfileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectionProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteConnectionProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectionProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectionProfileRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest"; - }; - - return DeleteConnectionProfileRequest; - })(); - - v1alpha1.ListStreamsRequest = (function() { - - /** - * Properties of a ListStreamsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListStreamsRequest - * @property {string|null} [parent] ListStreamsRequest parent - * @property {number|null} [pageSize] ListStreamsRequest pageSize - * @property {string|null} [pageToken] ListStreamsRequest pageToken - * @property {string|null} [filter] ListStreamsRequest filter - * @property {string|null} [orderBy] ListStreamsRequest orderBy - */ - - /** - * Constructs a new ListStreamsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListStreamsRequest. - * @implements IListStreamsRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest=} [properties] Properties to set - */ - function ListStreamsRequest(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]]; - } - - /** - * ListStreamsRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.parent = ""; - - /** - * ListStreamsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.pageSize = 0; - - /** - * ListStreamsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.pageToken = ""; - - /** - * ListStreamsRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.filter = ""; - - /** - * ListStreamsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - */ - ListStreamsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListStreamsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListStreamsRequest} ListStreamsRequest instance - */ - ListStreamsRequest.create = function create(properties) { - return new ListStreamsRequest(properties); - }; - - /** - * Encodes the specified ListStreamsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest} message ListStreamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListStreamsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsRequest} message ListStreamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListStreamsRequest} ListStreamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListStreamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListStreamsRequest} ListStreamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamsRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListStreamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListStreamsRequest} ListStreamsRequest - */ - ListStreamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListStreamsRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListStreamsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListStreamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ListStreamsRequest} message ListStreamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListStreamsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @instance - * @returns {Object.} JSON object - */ - ListStreamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListStreamsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListStreamsRequest"; - }; - - return ListStreamsRequest; - })(); - - v1alpha1.ListStreamsResponse = (function() { - - /** - * Properties of a ListStreamsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListStreamsResponse - * @property {Array.|null} [streams] ListStreamsResponse streams - * @property {string|null} [nextPageToken] ListStreamsResponse nextPageToken - * @property {Array.|null} [unreachable] ListStreamsResponse unreachable - */ - - /** - * Constructs a new ListStreamsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListStreamsResponse. - * @implements IListStreamsResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListStreamsResponse=} [properties] Properties to set - */ - function ListStreamsResponse(properties) { - this.streams = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListStreamsResponse streams. - * @member {Array.} streams - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.streams = $util.emptyArray; - - /** - * ListStreamsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.nextPageToken = ""; - - /** - * ListStreamsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @instance - */ - ListStreamsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListStreamsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListStreamsResponse} ListStreamsResponse instance - */ - ListStreamsResponse.create = function create(properties) { - return new ListStreamsResponse(properties); - }; - - /** - * Encodes the specified ListStreamsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsResponse} message ListStreamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.streams != null && message.streams.length) - for (var i = 0; i < message.streams.length; ++i) - $root.google.cloud.datastream.v1alpha1.Stream.encode(message.streams[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListStreamsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListStreamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListStreamsResponse} message ListStreamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStreamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListStreamsResponse} ListStreamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListStreamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.streams && message.streams.length)) - message.streams = []; - message.streams.push($root.google.cloud.datastream.v1alpha1.Stream.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStreamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListStreamsResponse} ListStreamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStreamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStreamsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStreamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.streams != null && message.hasOwnProperty("streams")) { - if (!Array.isArray(message.streams)) - return "streams: array expected"; - for (var i = 0; i < message.streams.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.Stream.verify(message.streams[i]); - if (error) - return "streams." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListStreamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListStreamsResponse} ListStreamsResponse - */ - ListStreamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListStreamsResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListStreamsResponse(); - if (object.streams) { - if (!Array.isArray(object.streams)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListStreamsResponse.streams: array expected"); - message.streams = []; - for (var i = 0; i < object.streams.length; ++i) { - if (typeof object.streams[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ListStreamsResponse.streams: object expected"); - message.streams[i] = $root.google.cloud.datastream.v1alpha1.Stream.fromObject(object.streams[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListStreamsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListStreamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.ListStreamsResponse} message ListStreamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStreamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.streams = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.streams && message.streams.length) { - object.streams = []; - for (var j = 0; j < message.streams.length; ++j) - object.streams[j] = $root.google.cloud.datastream.v1alpha1.Stream.toObject(message.streams[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListStreamsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @instance - * @returns {Object.} JSON object - */ - ListStreamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStreamsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListStreamsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStreamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListStreamsResponse"; - }; - - return ListStreamsResponse; - })(); - - v1alpha1.GetStreamRequest = (function() { - - /** - * Properties of a GetStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGetStreamRequest - * @property {string|null} [name] GetStreamRequest name - */ - - /** - * Constructs a new GetStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GetStreamRequest. - * @implements IGetStreamRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest=} [properties] Properties to set - */ - function GetStreamRequest(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]]; - } - - /** - * GetStreamRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @instance - */ - GetStreamRequest.prototype.name = ""; - - /** - * Creates a new GetStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GetStreamRequest} GetStreamRequest instance - */ - GetStreamRequest.create = function create(properties) { - return new GetStreamRequest(properties); - }; - - /** - * Encodes the specified GetStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest} message GetStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamRequest.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 GetStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetStreamRequest} message GetStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GetStreamRequest} GetStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GetStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GetStreamRequest} GetStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetStreamRequest.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 GetStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GetStreamRequest} GetStreamRequest - */ - GetStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GetStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GetStreamRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.GetStreamRequest} message GetStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetStreamRequest.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 GetStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @instance - * @returns {Object.} JSON object - */ - GetStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GetStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GetStreamRequest"; - }; - - return GetStreamRequest; - })(); - - v1alpha1.CreateStreamRequest = (function() { - - /** - * Properties of a CreateStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface ICreateStreamRequest - * @property {string|null} [parent] CreateStreamRequest parent - * @property {string|null} [streamId] CreateStreamRequest streamId - * @property {google.cloud.datastream.v1alpha1.IStream|null} [stream] CreateStreamRequest stream - * @property {string|null} [requestId] CreateStreamRequest requestId - * @property {boolean|null} [validateOnly] CreateStreamRequest validateOnly - * @property {boolean|null} [force] CreateStreamRequest force - */ - - /** - * Constructs a new CreateStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a CreateStreamRequest. - * @implements ICreateStreamRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest=} [properties] Properties to set - */ - function CreateStreamRequest(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]]; - } - - /** - * CreateStreamRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.parent = ""; - - /** - * CreateStreamRequest streamId. - * @member {string} streamId - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.streamId = ""; - - /** - * CreateStreamRequest stream. - * @member {google.cloud.datastream.v1alpha1.IStream|null|undefined} stream - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.stream = null; - - /** - * CreateStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.requestId = ""; - - /** - * CreateStreamRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.validateOnly = false; - - /** - * CreateStreamRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - */ - CreateStreamRequest.prototype.force = false; - - /** - * Creates a new CreateStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.CreateStreamRequest} CreateStreamRequest instance - */ - CreateStreamRequest.create = function create(properties) { - return new CreateStreamRequest(properties); - }; - - /** - * Encodes the specified CreateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest} message CreateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStreamRequest.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.streamId != null && Object.hasOwnProperty.call(message, "streamId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.streamId); - if (message.stream != null && Object.hasOwnProperty.call(message, "stream")) - $root.google.cloud.datastream.v1alpha1.Stream.encode(message.stream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); - return writer; - }; - - /** - * Encodes the specified CreateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateStreamRequest} message CreateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.CreateStreamRequest} CreateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.CreateStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.streamId = reader.string(); - break; - } - case 3: { - message.stream = $root.google.cloud.datastream.v1alpha1.Stream.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.CreateStreamRequest} CreateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateStreamRequest.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.streamId != null && message.hasOwnProperty("streamId")) - if (!$util.isString(message.streamId)) - return "streamId: string expected"; - if (message.stream != null && message.hasOwnProperty("stream")) { - var error = $root.google.cloud.datastream.v1alpha1.Stream.verify(message.stream); - if (error) - return "stream." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a CreateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.CreateStreamRequest} CreateStreamRequest - */ - CreateStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.CreateStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.CreateStreamRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.streamId != null) - message.streamId = String(object.streamId); - if (object.stream != null) { - if (typeof object.stream !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.CreateStreamRequest.stream: object expected"); - message.stream = $root.google.cloud.datastream.v1alpha1.Stream.fromObject(object.stream); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a CreateStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.CreateStreamRequest} message CreateStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.streamId = ""; - object.stream = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.streamId != null && message.hasOwnProperty("streamId")) - object.streamId = message.streamId; - if (message.stream != null && message.hasOwnProperty("stream")) - object.stream = $root.google.cloud.datastream.v1alpha1.Stream.toObject(message.stream, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this CreateStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @instance - * @returns {Object.} JSON object - */ - CreateStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.CreateStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.CreateStreamRequest"; - }; - - return CreateStreamRequest; - })(); - - v1alpha1.UpdateStreamRequest = (function() { - - /** - * Properties of an UpdateStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IUpdateStreamRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStreamRequest updateMask - * @property {google.cloud.datastream.v1alpha1.IStream|null} [stream] UpdateStreamRequest stream - * @property {string|null} [requestId] UpdateStreamRequest requestId - * @property {boolean|null} [validateOnly] UpdateStreamRequest validateOnly - * @property {boolean|null} [force] UpdateStreamRequest force - */ - - /** - * Constructs a new UpdateStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an UpdateStreamRequest. - * @implements IUpdateStreamRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest=} [properties] Properties to set - */ - function UpdateStreamRequest(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]]; - } - - /** - * UpdateStreamRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.updateMask = null; - - /** - * UpdateStreamRequest stream. - * @member {google.cloud.datastream.v1alpha1.IStream|null|undefined} stream - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.stream = null; - - /** - * UpdateStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.requestId = ""; - - /** - * UpdateStreamRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.validateOnly = false; - - /** - * UpdateStreamRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - */ - UpdateStreamRequest.prototype.force = false; - - /** - * Creates a new UpdateStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.UpdateStreamRequest} UpdateStreamRequest instance - */ - UpdateStreamRequest.create = function create(properties) { - return new UpdateStreamRequest(properties); - }; - - /** - * Encodes the specified UpdateStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest} message UpdateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStreamRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stream != null && Object.hasOwnProperty.call(message, "stream")) - $root.google.cloud.datastream.v1alpha1.Stream.encode(message.stream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; - - /** - * Encodes the specified UpdateStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.UpdateStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IUpdateStreamRequest} message UpdateStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.UpdateStreamRequest} UpdateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.UpdateStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stream = $root.google.cloud.datastream.v1alpha1.Stream.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.UpdateStreamRequest} UpdateStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateStreamRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.stream != null && message.hasOwnProperty("stream")) { - var error = $root.google.cloud.datastream.v1alpha1.Stream.verify(message.stream); - if (error) - return "stream." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates an UpdateStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.UpdateStreamRequest} UpdateStreamRequest - */ - UpdateStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.UpdateStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.UpdateStreamRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.UpdateStreamRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.stream != null) { - if (typeof object.stream !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.UpdateStreamRequest.stream: object expected"); - message.stream = $root.google.cloud.datastream.v1alpha1.Stream.fromObject(object.stream); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from an UpdateStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.UpdateStreamRequest} message UpdateStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.stream = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.stream != null && message.hasOwnProperty("stream")) - object.stream = $root.google.cloud.datastream.v1alpha1.Stream.toObject(message.stream, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this UpdateStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.UpdateStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.UpdateStreamRequest"; - }; - - return UpdateStreamRequest; - })(); - - v1alpha1.DeleteStreamRequest = (function() { - - /** - * Properties of a DeleteStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDeleteStreamRequest - * @property {string|null} [name] DeleteStreamRequest name - * @property {string|null} [requestId] DeleteStreamRequest requestId - */ - - /** - * Constructs a new DeleteStreamRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DeleteStreamRequest. - * @implements IDeleteStreamRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest=} [properties] Properties to set - */ - function DeleteStreamRequest(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]]; - } - - /** - * DeleteStreamRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @instance - */ - DeleteStreamRequest.prototype.name = ""; - - /** - * DeleteStreamRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @instance - */ - DeleteStreamRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteStreamRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DeleteStreamRequest} DeleteStreamRequest instance - */ - DeleteStreamRequest.create = function create(properties) { - return new DeleteStreamRequest(properties); - }; - - /** - * Encodes the specified DeleteStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteStreamRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest} message DeleteStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStreamRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteStreamRequest} message DeleteStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DeleteStreamRequest} DeleteStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DeleteStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DeleteStreamRequest} DeleteStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteStreamRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteStreamRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DeleteStreamRequest} DeleteStreamRequest - */ - DeleteStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DeleteStreamRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DeleteStreamRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {google.cloud.datastream.v1alpha1.DeleteStreamRequest} message DeleteStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteStreamRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteStreamRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DeleteStreamRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DeleteStreamRequest"; - }; - - return DeleteStreamRequest; - })(); - - v1alpha1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion - * @property {google.cloud.datastream.v1alpha1.IValidationResult|null} [validationResult] OperationMetadata validationResult - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(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]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * OperationMetadata validationResult. - * @member {google.cloud.datastream.v1alpha1.IValidationResult|null|undefined} validationResult - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.validationResult = null; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1alpha1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - if (message.validationResult != null && Object.hasOwnProperty.call(message, "validationResult")) - $root.google.cloud.datastream.v1alpha1.ValidationResult.encode(message.validationResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - break; - } - case 8: { - message.validationResult = $root.google.cloud.datastream.v1alpha1.ValidationResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; - if (message.validationResult != null && message.hasOwnProperty("validationResult")) { - var error = $root.google.cloud.datastream.v1alpha1.ValidationResult.verify(message.validationResult); - if (error) - return "validationResult." + error; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OperationMetadata) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - if (object.validationResult != null) { - if (typeof object.validationResult !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OperationMetadata.validationResult: object expected"); - message.validationResult = $root.google.cloud.datastream.v1alpha1.ValidationResult.fromObject(object.validationResult); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {google.cloud.datastream.v1alpha1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - object.validationResult = null; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - if (message.validationResult != null && message.hasOwnProperty("validationResult")) - object.validationResult = $root.google.cloud.datastream.v1alpha1.ValidationResult.toObject(message.validationResult, options); - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1alpha1.CreatePrivateConnectionRequest = (function() { - - /** - * Properties of a CreatePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface ICreatePrivateConnectionRequest - * @property {string|null} [parent] CreatePrivateConnectionRequest parent - * @property {string|null} [privateConnectionId] CreatePrivateConnectionRequest privateConnectionId - * @property {google.cloud.datastream.v1alpha1.IPrivateConnection|null} [privateConnection] CreatePrivateConnectionRequest privateConnection - * @property {string|null} [requestId] CreatePrivateConnectionRequest requestId - */ - - /** - * Constructs a new CreatePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a CreatePrivateConnectionRequest. - * @implements ICreatePrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest=} [properties] Properties to set - */ - function CreatePrivateConnectionRequest(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]]; - } - - /** - * CreatePrivateConnectionRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.parent = ""; - - /** - * CreatePrivateConnectionRequest privateConnectionId. - * @member {string} privateConnectionId - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.privateConnectionId = ""; - - /** - * CreatePrivateConnectionRequest privateConnection. - * @member {google.cloud.datastream.v1alpha1.IPrivateConnection|null|undefined} privateConnection - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.privateConnection = null; - - /** - * CreatePrivateConnectionRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @instance - */ - CreatePrivateConnectionRequest.prototype.requestId = ""; - - /** - * Creates a new CreatePrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest instance - */ - CreatePrivateConnectionRequest.create = function create(properties) { - return new CreatePrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePrivateConnectionRequest.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.privateConnectionId != null && Object.hasOwnProperty.call(message, "privateConnectionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateConnectionId); - if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) - $root.google.cloud.datastream.v1alpha1.PrivateConnection.encode(message.privateConnection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.privateConnectionId = reader.string(); - break; - } - case 3: { - message.privateConnection = $root.google.cloud.datastream.v1alpha1.PrivateConnection.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePrivateConnectionRequest.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.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) - if (!$util.isString(message.privateConnectionId)) - return "privateConnectionId: string expected"; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) { - var error = $root.google.cloud.datastream.v1alpha1.PrivateConnection.verify(message.privateConnection); - if (error) - return "privateConnection." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest - */ - CreatePrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.privateConnectionId != null) - message.privateConnectionId = String(object.privateConnectionId); - if (object.privateConnection != null) { - if (typeof object.privateConnection !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.privateConnection: object expected"); - message.privateConnection = $root.google.cloud.datastream.v1alpha1.PrivateConnection.fromObject(object.privateConnection); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest} message CreatePrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePrivateConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.privateConnectionId = ""; - object.privateConnection = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) - object.privateConnectionId = message.privateConnectionId; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - object.privateConnection = $root.google.cloud.datastream.v1alpha1.PrivateConnection.toObject(message.privateConnection, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreatePrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest"; - }; - - return CreatePrivateConnectionRequest; - })(); - - v1alpha1.ListPrivateConnectionsRequest = (function() { - - /** - * Properties of a ListPrivateConnectionsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListPrivateConnectionsRequest - * @property {string|null} [parent] ListPrivateConnectionsRequest parent - * @property {number|null} [pageSize] ListPrivateConnectionsRequest pageSize - * @property {string|null} [pageToken] ListPrivateConnectionsRequest pageToken - * @property {string|null} [filter] ListPrivateConnectionsRequest filter - * @property {string|null} [orderBy] ListPrivateConnectionsRequest orderBy - */ - - /** - * Constructs a new ListPrivateConnectionsRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListPrivateConnectionsRequest. - * @implements IListPrivateConnectionsRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest=} [properties] Properties to set - */ - function ListPrivateConnectionsRequest(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]]; - } - - /** - * ListPrivateConnectionsRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.parent = ""; - - /** - * ListPrivateConnectionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.pageSize = 0; - - /** - * ListPrivateConnectionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.pageToken = ""; - - /** - * ListPrivateConnectionsRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.filter = ""; - - /** - * ListPrivateConnectionsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - */ - ListPrivateConnectionsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListPrivateConnectionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest instance - */ - ListPrivateConnectionsRequest.create = function create(properties) { - return new ListPrivateConnectionsRequest(properties); - }; - - /** - * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPrivateConnectionsRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPrivateConnectionsRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest - */ - ListPrivateConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest} message ListPrivateConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPrivateConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListPrivateConnectionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPrivateConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPrivateConnectionsRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPrivateConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest"; - }; - - return ListPrivateConnectionsRequest; - })(); - - v1alpha1.ListPrivateConnectionsResponse = (function() { - - /** - * Properties of a ListPrivateConnectionsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListPrivateConnectionsResponse - * @property {Array.|null} [privateConnections] ListPrivateConnectionsResponse privateConnections - * @property {string|null} [nextPageToken] ListPrivateConnectionsResponse nextPageToken - * @property {Array.|null} [unreachable] ListPrivateConnectionsResponse unreachable - */ - - /** - * Constructs a new ListPrivateConnectionsResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListPrivateConnectionsResponse. - * @implements IListPrivateConnectionsResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse=} [properties] Properties to set - */ - function ListPrivateConnectionsResponse(properties) { - this.privateConnections = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPrivateConnectionsResponse privateConnections. - * @member {Array.} privateConnections - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.privateConnections = $util.emptyArray; - - /** - * ListPrivateConnectionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.nextPageToken = ""; - - /** - * ListPrivateConnectionsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @instance - */ - ListPrivateConnectionsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListPrivateConnectionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse instance - */ - ListPrivateConnectionsResponse.create = function create(properties) { - return new ListPrivateConnectionsResponse(properties); - }; - - /** - * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateConnections != null && message.privateConnections.length) - for (var i = 0; i < message.privateConnections.length; ++i) - $root.google.cloud.datastream.v1alpha1.PrivateConnection.encode(message.privateConnections[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPrivateConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.privateConnections && message.privateConnections.length)) - message.privateConnections = []; - message.privateConnections.push($root.google.cloud.datastream.v1alpha1.PrivateConnection.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPrivateConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPrivateConnectionsResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPrivateConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateConnections != null && message.hasOwnProperty("privateConnections")) { - if (!Array.isArray(message.privateConnections)) - return "privateConnections: array expected"; - for (var i = 0; i < message.privateConnections.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.PrivateConnection.verify(message.privateConnections[i]); - if (error) - return "privateConnections." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse - */ - ListPrivateConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse(); - if (object.privateConnections) { - if (!Array.isArray(object.privateConnections)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.privateConnections: array expected"); - message.privateConnections = []; - for (var i = 0; i < object.privateConnections.length; ++i) { - if (typeof object.privateConnections[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.privateConnections: object expected"); - message.privateConnections[i] = $root.google.cloud.datastream.v1alpha1.PrivateConnection.fromObject(object.privateConnections[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse} message ListPrivateConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPrivateConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.privateConnections = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.privateConnections && message.privateConnections.length) { - object.privateConnections = []; - for (var j = 0; j < message.privateConnections.length; ++j) - object.privateConnections[j] = $root.google.cloud.datastream.v1alpha1.PrivateConnection.toObject(message.privateConnections[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListPrivateConnectionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPrivateConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPrivateConnectionsResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPrivateConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse"; - }; - - return ListPrivateConnectionsResponse; - })(); - - v1alpha1.DeletePrivateConnectionRequest = (function() { - - /** - * Properties of a DeletePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDeletePrivateConnectionRequest - * @property {string|null} [name] DeletePrivateConnectionRequest name - * @property {string|null} [requestId] DeletePrivateConnectionRequest requestId - * @property {boolean|null} [force] DeletePrivateConnectionRequest force - */ - - /** - * Constructs a new DeletePrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DeletePrivateConnectionRequest. - * @implements IDeletePrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest=} [properties] Properties to set - */ - function DeletePrivateConnectionRequest(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]]; - } - - /** - * DeletePrivateConnectionRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.name = ""; - - /** - * DeletePrivateConnectionRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.requestId = ""; - - /** - * DeletePrivateConnectionRequest force. - * @member {boolean} force - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @instance - */ - DeletePrivateConnectionRequest.prototype.force = false; - - /** - * Creates a new DeletePrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest instance - */ - DeletePrivateConnectionRequest.create = function create(properties) { - return new DeletePrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePrivateConnectionRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePrivateConnectionRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest - */ - DeletePrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest} message DeletePrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePrivateConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeletePrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest"; - }; - - return DeletePrivateConnectionRequest; - })(); - - v1alpha1.GetPrivateConnectionRequest = (function() { - - /** - * Properties of a GetPrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGetPrivateConnectionRequest - * @property {string|null} [name] GetPrivateConnectionRequest name - */ - - /** - * Constructs a new GetPrivateConnectionRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GetPrivateConnectionRequest. - * @implements IGetPrivateConnectionRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest=} [properties] Properties to set - */ - function GetPrivateConnectionRequest(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]]; - } - - /** - * GetPrivateConnectionRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @instance - */ - GetPrivateConnectionRequest.prototype.name = ""; - - /** - * Creates a new GetPrivateConnectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest} GetPrivateConnectionRequest instance - */ - GetPrivateConnectionRequest.create = function create(properties) { - return new GetPrivateConnectionRequest(properties); - }; - - /** - * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrivateConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPrivateConnectionRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest} GetPrivateConnectionRequest - */ - GetPrivateConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest} message GetPrivateConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPrivateConnectionRequest.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 GetPrivateConnectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - GetPrivateConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPrivateConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest"; - }; - - return GetPrivateConnectionRequest; - })(); - - v1alpha1.CreateRouteRequest = (function() { - - /** - * Properties of a CreateRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface ICreateRouteRequest - * @property {string|null} [parent] CreateRouteRequest parent - * @property {string|null} [routeId] CreateRouteRequest routeId - * @property {google.cloud.datastream.v1alpha1.IRoute|null} [route] CreateRouteRequest route - * @property {string|null} [requestId] CreateRouteRequest requestId - */ - - /** - * Constructs a new CreateRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a CreateRouteRequest. - * @implements ICreateRouteRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest=} [properties] Properties to set - */ - function CreateRouteRequest(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]]; - } - - /** - * CreateRouteRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.parent = ""; - - /** - * CreateRouteRequest routeId. - * @member {string} routeId - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.routeId = ""; - - /** - * CreateRouteRequest route. - * @member {google.cloud.datastream.v1alpha1.IRoute|null|undefined} route - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.route = null; - - /** - * CreateRouteRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @instance - */ - CreateRouteRequest.prototype.requestId = ""; - - /** - * Creates a new CreateRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.CreateRouteRequest} CreateRouteRequest instance - */ - CreateRouteRequest.create = function create(properties) { - return new CreateRouteRequest(properties); - }; - - /** - * Encodes the specified CreateRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest} message CreateRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRouteRequest.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.routeId != null && Object.hasOwnProperty.call(message, "routeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.routeId); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.datastream.v1alpha1.Route.encode(message.route, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreateRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.CreateRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ICreateRouteRequest} message CreateRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.CreateRouteRequest} CreateRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.CreateRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.routeId = reader.string(); - break; - } - case 3: { - message.route = $root.google.cloud.datastream.v1alpha1.Route.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.CreateRouteRequest} CreateRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRouteRequest.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.routeId != null && message.hasOwnProperty("routeId")) - if (!$util.isString(message.routeId)) - return "routeId: string expected"; - if (message.route != null && message.hasOwnProperty("route")) { - var error = $root.google.cloud.datastream.v1alpha1.Route.verify(message.route); - if (error) - return "route." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.CreateRouteRequest} CreateRouteRequest - */ - CreateRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.CreateRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.CreateRouteRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.routeId != null) - message.routeId = String(object.routeId); - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.CreateRouteRequest.route: object expected"); - message.route = $root.google.cloud.datastream.v1alpha1.Route.fromObject(object.route); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.CreateRouteRequest} message CreateRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRouteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.routeId = ""; - object.route = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.routeId != null && message.hasOwnProperty("routeId")) - object.routeId = message.routeId; - if (message.route != null && message.hasOwnProperty("route")) - object.route = $root.google.cloud.datastream.v1alpha1.Route.toObject(message.route, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.CreateRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.CreateRouteRequest"; - }; - - return CreateRouteRequest; - })(); - - v1alpha1.ListRoutesRequest = (function() { - - /** - * Properties of a ListRoutesRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListRoutesRequest - * @property {string|null} [parent] ListRoutesRequest parent - * @property {number|null} [pageSize] ListRoutesRequest pageSize - * @property {string|null} [pageToken] ListRoutesRequest pageToken - * @property {string|null} [filter] ListRoutesRequest filter - * @property {string|null} [orderBy] ListRoutesRequest orderBy - */ - - /** - * Constructs a new ListRoutesRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListRoutesRequest. - * @implements IListRoutesRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest=} [properties] Properties to set - */ - function ListRoutesRequest(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]]; - } - - /** - * ListRoutesRequest parent. - * @member {string} parent - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.parent = ""; - - /** - * ListRoutesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.pageSize = 0; - - /** - * ListRoutesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.pageToken = ""; - - /** - * ListRoutesRequest filter. - * @member {string} filter - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.filter = ""; - - /** - * ListRoutesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - */ - ListRoutesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListRoutesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListRoutesRequest} ListRoutesRequest instance - */ - ListRoutesRequest.create = function create(properties) { - return new ListRoutesRequest(properties); - }; - - /** - * Encodes the specified ListRoutesRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest} message ListRoutesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListRoutesRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesRequest} message ListRoutesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListRoutesRequest} ListRoutesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListRoutesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRoutesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListRoutesRequest} ListRoutesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRoutesRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRoutesRequest.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.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"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListRoutesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListRoutesRequest} ListRoutesRequest - */ - ListRoutesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListRoutesRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListRoutesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListRoutesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {google.cloud.datastream.v1alpha1.ListRoutesRequest} message ListRoutesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRoutesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListRoutesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @instance - * @returns {Object.} JSON object - */ - ListRoutesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRoutesRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListRoutesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRoutesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListRoutesRequest"; - }; - - return ListRoutesRequest; - })(); - - v1alpha1.ListRoutesResponse = (function() { - - /** - * Properties of a ListRoutesResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IListRoutesResponse - * @property {Array.|null} [routes] ListRoutesResponse routes - * @property {string|null} [nextPageToken] ListRoutesResponse nextPageToken - * @property {Array.|null} [unreachable] ListRoutesResponse unreachable - */ - - /** - * Constructs a new ListRoutesResponse. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ListRoutesResponse. - * @implements IListRoutesResponse - * @constructor - * @param {google.cloud.datastream.v1alpha1.IListRoutesResponse=} [properties] Properties to set - */ - function ListRoutesResponse(properties) { - this.routes = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRoutesResponse routes. - * @member {Array.} routes - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.routes = $util.emptyArray; - - /** - * ListRoutesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.nextPageToken = ""; - - /** - * ListRoutesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @instance - */ - ListRoutesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListRoutesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesResponse=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ListRoutesResponse} ListRoutesResponse instance - */ - ListRoutesResponse.create = function create(properties) { - return new ListRoutesResponse(properties); - }; - - /** - * Encodes the specified ListRoutesResponse message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesResponse} message ListRoutesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.routes != null && message.routes.length) - for (var i = 0; i < message.routes.length; ++i) - $root.google.cloud.datastream.v1alpha1.Route.encode(message.routes[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListRoutesResponse message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ListRoutesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.IListRoutesResponse} message ListRoutesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRoutesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ListRoutesResponse} ListRoutesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ListRoutesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.routes && message.routes.length)) - message.routes = []; - message.routes.push($root.google.cloud.datastream.v1alpha1.Route.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRoutesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ListRoutesResponse} ListRoutesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRoutesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRoutesResponse message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRoutesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.routes != null && message.hasOwnProperty("routes")) { - if (!Array.isArray(message.routes)) - return "routes: array expected"; - for (var i = 0; i < message.routes.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.Route.verify(message.routes[i]); - if (error) - return "routes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListRoutesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ListRoutesResponse} ListRoutesResponse - */ - ListRoutesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ListRoutesResponse) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ListRoutesResponse(); - if (object.routes) { - if (!Array.isArray(object.routes)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListRoutesResponse.routes: array expected"); - message.routes = []; - for (var i = 0; i < object.routes.length; ++i) { - if (typeof object.routes[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ListRoutesResponse.routes: object expected"); - message.routes[i] = $root.google.cloud.datastream.v1alpha1.Route.fromObject(object.routes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datastream.v1alpha1.ListRoutesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListRoutesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {google.cloud.datastream.v1alpha1.ListRoutesResponse} message ListRoutesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRoutesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.routes = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.routes && message.routes.length) { - object.routes = []; - for (var j = 0; j < message.routes.length; ++j) - object.routes[j] = $root.google.cloud.datastream.v1alpha1.Route.toObject(message.routes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListRoutesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @instance - * @returns {Object.} JSON object - */ - ListRoutesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRoutesResponse - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ListRoutesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRoutesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ListRoutesResponse"; - }; - - return ListRoutesResponse; - })(); - - v1alpha1.DeleteRouteRequest = (function() { - - /** - * Properties of a DeleteRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDeleteRouteRequest - * @property {string|null} [name] DeleteRouteRequest name - * @property {string|null} [requestId] DeleteRouteRequest requestId - */ - - /** - * Constructs a new DeleteRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DeleteRouteRequest. - * @implements IDeleteRouteRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest=} [properties] Properties to set - */ - function DeleteRouteRequest(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]]; - } - - /** - * DeleteRouteRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @instance - */ - DeleteRouteRequest.prototype.name = ""; - - /** - * DeleteRouteRequest requestId. - * @member {string} requestId - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @instance - */ - DeleteRouteRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DeleteRouteRequest} DeleteRouteRequest instance - */ - DeleteRouteRequest.create = function create(properties) { - return new DeleteRouteRequest(properties); - }; - - /** - * Encodes the specified DeleteRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest} message DeleteRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRouteRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeleteRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DeleteRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IDeleteRouteRequest} message DeleteRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DeleteRouteRequest} DeleteRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DeleteRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DeleteRouteRequest} DeleteRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteRouteRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeleteRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DeleteRouteRequest} DeleteRouteRequest - */ - DeleteRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DeleteRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DeleteRouteRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeleteRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.DeleteRouteRequest} message DeleteRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteRouteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeleteRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DeleteRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DeleteRouteRequest"; - }; - - return DeleteRouteRequest; - })(); - - v1alpha1.GetRouteRequest = (function() { - - /** - * Properties of a GetRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGetRouteRequest - * @property {string|null} [name] GetRouteRequest name - */ - - /** - * Constructs a new GetRouteRequest. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GetRouteRequest. - * @implements IGetRouteRequest - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest=} [properties] Properties to set - */ - function GetRouteRequest(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]]; - } - - /** - * GetRouteRequest name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @instance - */ - GetRouteRequest.prototype.name = ""; - - /** - * Creates a new GetRouteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GetRouteRequest} GetRouteRequest instance - */ - GetRouteRequest.create = function create(properties) { - return new GetRouteRequest(properties); - }; - - /** - * Encodes the specified GetRouteRequest message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetRouteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest} message GetRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRouteRequest.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 GetRouteRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GetRouteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.IGetRouteRequest} message GetRouteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRouteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GetRouteRequest} GetRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRouteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GetRouteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRouteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GetRouteRequest} GetRouteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRouteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRouteRequest message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRouteRequest.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 GetRouteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GetRouteRequest} GetRouteRequest - */ - GetRouteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GetRouteRequest) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GetRouteRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRouteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {google.cloud.datastream.v1alpha1.GetRouteRequest} message GetRouteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRouteRequest.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 GetRouteRequest to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @instance - * @returns {Object.} JSON object - */ - GetRouteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRouteRequest - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GetRouteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRouteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GetRouteRequest"; - }; - - return GetRouteRequest; - })(); - - v1alpha1.OracleProfile = (function() { - - /** - * Properties of an OracleProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleProfile - * @property {string|null} [hostname] OracleProfile hostname - * @property {number|null} [port] OracleProfile port - * @property {string|null} [username] OracleProfile username - * @property {string|null} [password] OracleProfile password - * @property {string|null} [databaseService] OracleProfile databaseService - * @property {Object.|null} [connectionAttributes] OracleProfile connectionAttributes - */ - - /** - * Constructs a new OracleProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleProfile. - * @implements IOracleProfile - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleProfile=} [properties] Properties to set - */ - function OracleProfile(properties) { - this.connectionAttributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.hostname = ""; - - /** - * OracleProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.port = 0; - - /** - * OracleProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.username = ""; - - /** - * OracleProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.password = ""; - - /** - * OracleProfile databaseService. - * @member {string} databaseService - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.databaseService = ""; - - /** - * OracleProfile connectionAttributes. - * @member {Object.} connectionAttributes - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - */ - OracleProfile.prototype.connectionAttributes = $util.emptyObject; - - /** - * Creates a new OracleProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleProfile} OracleProfile instance - */ - OracleProfile.create = function create(properties) { - return new OracleProfile(properties); - }; - - /** - * Encodes the specified OracleProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleProfile} message OracleProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.databaseService != null && Object.hasOwnProperty.call(message, "databaseService")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseService); - if (message.connectionAttributes != null && Object.hasOwnProperty.call(message, "connectionAttributes")) - for (var keys = Object.keys(message.connectionAttributes), 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.connectionAttributes[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleProfile} message OracleProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleProfile} OracleProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleProfile(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.databaseService = reader.string(); - break; - } - case 6: { - if (message.connectionAttributes === $util.emptyObject) - message.connectionAttributes = {}; - 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.connectionAttributes[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleProfile} OracleProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleProfile message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.databaseService != null && message.hasOwnProperty("databaseService")) - if (!$util.isString(message.databaseService)) - return "databaseService: string expected"; - if (message.connectionAttributes != null && message.hasOwnProperty("connectionAttributes")) { - if (!$util.isObject(message.connectionAttributes)) - return "connectionAttributes: object expected"; - var key = Object.keys(message.connectionAttributes); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.connectionAttributes[key[i]])) - return "connectionAttributes: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an OracleProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleProfile} OracleProfile - */ - OracleProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleProfile) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.databaseService != null) - message.databaseService = String(object.databaseService); - if (object.connectionAttributes) { - if (typeof object.connectionAttributes !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleProfile.connectionAttributes: object expected"); - message.connectionAttributes = {}; - for (var keys = Object.keys(object.connectionAttributes), i = 0; i < keys.length; ++i) - message.connectionAttributes[keys[i]] = String(object.connectionAttributes[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an OracleProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {google.cloud.datastream.v1alpha1.OracleProfile} message OracleProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.connectionAttributes = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.databaseService = ""; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.databaseService != null && message.hasOwnProperty("databaseService")) - object.databaseService = message.databaseService; - var keys2; - if (message.connectionAttributes && (keys2 = Object.keys(message.connectionAttributes)).length) { - object.connectionAttributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.connectionAttributes[keys2[j]] = message.connectionAttributes[keys2[j]]; - } - return object; - }; - - /** - * Converts this OracleProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @instance - * @returns {Object.} JSON object - */ - OracleProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleProfile"; - }; - - return OracleProfile; - })(); - - v1alpha1.MysqlProfile = (function() { - - /** - * Properties of a MysqlProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlProfile - * @property {string|null} [hostname] MysqlProfile hostname - * @property {number|null} [port] MysqlProfile port - * @property {string|null} [username] MysqlProfile username - * @property {string|null} [password] MysqlProfile password - * @property {google.cloud.datastream.v1alpha1.IMysqlSslConfig|null} [sslConfig] MysqlProfile sslConfig - */ - - /** - * Constructs a new MysqlProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlProfile. - * @implements IMysqlProfile - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlProfile=} [properties] Properties to set - */ - function MysqlProfile(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]]; - } - - /** - * MysqlProfile hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.hostname = ""; - - /** - * MysqlProfile port. - * @member {number} port - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.port = 0; - - /** - * MysqlProfile username. - * @member {string} username - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.username = ""; - - /** - * MysqlProfile password. - * @member {string} password - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.password = ""; - - /** - * MysqlProfile sslConfig. - * @member {google.cloud.datastream.v1alpha1.IMysqlSslConfig|null|undefined} sslConfig - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - */ - MysqlProfile.prototype.sslConfig = null; - - /** - * Creates a new MysqlProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlProfile} MysqlProfile instance - */ - MysqlProfile.create = function create(properties) { - return new MysqlProfile(properties); - }; - - /** - * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlProfile} message MysqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) - $root.google.cloud.datastream.v1alpha1.MysqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlProfile} message MysqlProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlProfile} MysqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.sslConfig = $root.google.cloud.datastream.v1alpha1.MysqlSslConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlProfile} MysqlProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlProfile message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlSslConfig.verify(message.sslConfig); - if (error) - return "sslConfig." + error; - } - return null; - }; - - /** - * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlProfile} MysqlProfile - */ - MysqlProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlProfile) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlProfile(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.sslConfig != null) { - if (typeof object.sslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlProfile.sslConfig: object expected"); - message.sslConfig = $root.google.cloud.datastream.v1alpha1.MysqlSslConfig.fromObject(object.sslConfig); - } - return message; - }; - - /** - * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlProfile} message MysqlProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.sslConfig = null; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) - object.sslConfig = $root.google.cloud.datastream.v1alpha1.MysqlSslConfig.toObject(message.sslConfig, options); - return object; - }; - - /** - * Converts this MysqlProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @instance - * @returns {Object.} JSON object - */ - MysqlProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlProfile"; - }; - - return MysqlProfile; - })(); - - v1alpha1.GcsProfile = (function() { - - /** - * Properties of a GcsProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGcsProfile - * @property {string|null} [bucketName] GcsProfile bucketName - * @property {string|null} [rootPath] GcsProfile rootPath - */ - - /** - * Constructs a new GcsProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GcsProfile. - * @implements IGcsProfile - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGcsProfile=} [properties] Properties to set - */ - function GcsProfile(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]]; - } - - /** - * GcsProfile bucketName. - * @member {string} bucketName - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @instance - */ - GcsProfile.prototype.bucketName = ""; - - /** - * GcsProfile rootPath. - * @member {string} rootPath - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @instance - */ - GcsProfile.prototype.rootPath = ""; - - /** - * Creates a new GcsProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GcsProfile} GcsProfile instance - */ - GcsProfile.create = function create(properties) { - return new GcsProfile(properties); - }; - - /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsProfile} message GcsProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsProfile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName); - if (message.rootPath != null && Object.hasOwnProperty.call(message, "rootPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rootPath); - return writer; - }; - - /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsProfile} message GcsProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GcsProfile} GcsProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GcsProfile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucketName = reader.string(); - break; - } - case 2: { - message.rootPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GcsProfile} GcsProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsProfile message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucketName != null && message.hasOwnProperty("bucketName")) - if (!$util.isString(message.bucketName)) - return "bucketName: string expected"; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - if (!$util.isString(message.rootPath)) - return "rootPath: string expected"; - return null; - }; - - /** - * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GcsProfile} GcsProfile - */ - GcsProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GcsProfile) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GcsProfile(); - if (object.bucketName != null) - message.bucketName = String(object.bucketName); - if (object.rootPath != null) - message.rootPath = String(object.rootPath); - return message; - }; - - /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {google.cloud.datastream.v1alpha1.GcsProfile} message GcsProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bucketName = ""; - object.rootPath = ""; - } - if (message.bucketName != null && message.hasOwnProperty("bucketName")) - object.bucketName = message.bucketName; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - object.rootPath = message.rootPath; - return object; - }; - - /** - * Converts this GcsProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @instance - * @returns {Object.} JSON object - */ - GcsProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GcsProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GcsProfile"; - }; - - return GcsProfile; - })(); - - v1alpha1.NoConnectivitySettings = (function() { - - /** - * Properties of a NoConnectivitySettings. - * @memberof google.cloud.datastream.v1alpha1 - * @interface INoConnectivitySettings - */ - - /** - * Constructs a new NoConnectivitySettings. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a NoConnectivitySettings. - * @implements INoConnectivitySettings - * @constructor - * @param {google.cloud.datastream.v1alpha1.INoConnectivitySettings=} [properties] Properties to set - */ - function NoConnectivitySettings(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 NoConnectivitySettings instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {google.cloud.datastream.v1alpha1.INoConnectivitySettings=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.NoConnectivitySettings} NoConnectivitySettings instance - */ - NoConnectivitySettings.create = function create(properties) { - return new NoConnectivitySettings(properties); - }; - - /** - * Encodes the specified NoConnectivitySettings message. Does not implicitly {@link google.cloud.datastream.v1alpha1.NoConnectivitySettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {google.cloud.datastream.v1alpha1.INoConnectivitySettings} message NoConnectivitySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoConnectivitySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified NoConnectivitySettings message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.NoConnectivitySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {google.cloud.datastream.v1alpha1.INoConnectivitySettings} message NoConnectivitySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoConnectivitySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NoConnectivitySettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.NoConnectivitySettings} NoConnectivitySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoConnectivitySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NoConnectivitySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.NoConnectivitySettings} NoConnectivitySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoConnectivitySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NoConnectivitySettings message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NoConnectivitySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a NoConnectivitySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.NoConnectivitySettings} NoConnectivitySettings - */ - NoConnectivitySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings) - return object; - return new $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings(); - }; - - /** - * Creates a plain object from a NoConnectivitySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {google.cloud.datastream.v1alpha1.NoConnectivitySettings} message NoConnectivitySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NoConnectivitySettings.toObject = function toObject() { - return {}; - }; - - /** - * Converts this NoConnectivitySettings to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @instance - * @returns {Object.} JSON object - */ - NoConnectivitySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NoConnectivitySettings - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.NoConnectivitySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NoConnectivitySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.NoConnectivitySettings"; - }; - - return NoConnectivitySettings; - })(); - - v1alpha1.StaticServiceIpConnectivity = (function() { - - /** - * Properties of a StaticServiceIpConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IStaticServiceIpConnectivity - */ - - /** - * Constructs a new StaticServiceIpConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a StaticServiceIpConnectivity. - * @implements IStaticServiceIpConnectivity - * @constructor - * @param {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity=} [properties] Properties to set - */ - function StaticServiceIpConnectivity(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 StaticServiceIpConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity} StaticServiceIpConnectivity instance - */ - StaticServiceIpConnectivity.create = function create(properties) { - return new StaticServiceIpConnectivity(properties); - }; - - /** - * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StaticServiceIpConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StaticServiceIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StaticServiceIpConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StaticServiceIpConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StaticServiceIpConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StaticServiceIpConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity} StaticServiceIpConnectivity - */ - StaticServiceIpConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity) - return object; - return new $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity(); - }; - - /** - * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity} message StaticServiceIpConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StaticServiceIpConnectivity.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StaticServiceIpConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @instance - * @returns {Object.} JSON object - */ - StaticServiceIpConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StaticServiceIpConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StaticServiceIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity"; - }; - - return StaticServiceIpConnectivity; - })(); - - v1alpha1.ForwardSshTunnelConnectivity = (function() { - - /** - * Properties of a ForwardSshTunnelConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IForwardSshTunnelConnectivity - * @property {string|null} [hostname] ForwardSshTunnelConnectivity hostname - * @property {string|null} [username] ForwardSshTunnelConnectivity username - * @property {number|null} [port] ForwardSshTunnelConnectivity port - * @property {string|null} [password] ForwardSshTunnelConnectivity password - * @property {string|null} [privateKey] ForwardSshTunnelConnectivity privateKey - */ - - /** - * Constructs a new ForwardSshTunnelConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ForwardSshTunnelConnectivity. - * @implements IForwardSshTunnelConnectivity - * @constructor - * @param {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity=} [properties] Properties to set - */ - function ForwardSshTunnelConnectivity(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]]; - } - - /** - * ForwardSshTunnelConnectivity hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.hostname = ""; - - /** - * ForwardSshTunnelConnectivity username. - * @member {string} username - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.username = ""; - - /** - * ForwardSshTunnelConnectivity port. - * @member {number} port - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.port = 0; - - /** - * ForwardSshTunnelConnectivity password. - * @member {string|null|undefined} password - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.password = null; - - /** - * ForwardSshTunnelConnectivity privateKey. - * @member {string|null|undefined} privateKey - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.privateKey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ForwardSshTunnelConnectivity authenticationMethod. - * @member {"password"|"privateKey"|undefined} authenticationMethod - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - */ - Object.defineProperty(ForwardSshTunnelConnectivity.prototype, "authenticationMethod", { - get: $util.oneOfGetter($oneOfFields = ["password", "privateKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity instance - */ - ForwardSshTunnelConnectivity.create = function create(properties) { - return new ForwardSshTunnelConnectivity(properties); - }; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardSshTunnelConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.password); - if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.privateKey); - return writer; - }; - - /** - * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardSshTunnelConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardSshTunnelConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.username = reader.string(); - break; - } - case 3: { - message.port = reader.int32(); - break; - } - case 100: { - message.password = reader.string(); - break; - } - case 101: { - message.privateKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardSshTunnelConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardSshTunnelConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardSshTunnelConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.password != null && message.hasOwnProperty("password")) { - properties.authenticationMethod = 1; - if (!$util.isString(message.password)) - return "password: string expected"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - if (properties.authenticationMethod === 1) - return "authenticationMethod: multiple values"; - properties.authenticationMethod = 1; - if (!$util.isString(message.privateKey)) - return "privateKey: string expected"; - } - return null; - }; - - /** - * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity - */ - ForwardSshTunnelConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.username != null) - message.username = String(object.username); - if (object.port != null) - message.port = object.port | 0; - if (object.password != null) - message.password = String(object.password); - if (object.privateKey != null) - message.privateKey = String(object.privateKey); - return message; - }; - - /** - * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardSshTunnelConnectivity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.username = ""; - object.port = 0; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.password != null && message.hasOwnProperty("password")) { - object.password = message.password; - if (options.oneofs) - object.authenticationMethod = "password"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - object.privateKey = message.privateKey; - if (options.oneofs) - object.authenticationMethod = "privateKey"; - } - return object; - }; - - /** - * Converts this ForwardSshTunnelConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @instance - * @returns {Object.} JSON object - */ - ForwardSshTunnelConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardSshTunnelConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardSshTunnelConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity"; - }; - - return ForwardSshTunnelConnectivity; - })(); - - v1alpha1.VpcPeeringConfig = (function() { - - /** - * Properties of a VpcPeeringConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IVpcPeeringConfig - * @property {string|null} [vpcName] VpcPeeringConfig vpcName - * @property {string|null} [subnet] VpcPeeringConfig subnet - */ - - /** - * Constructs a new VpcPeeringConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a VpcPeeringConfig. - * @implements IVpcPeeringConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IVpcPeeringConfig=} [properties] Properties to set - */ - function VpcPeeringConfig(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]]; - } - - /** - * VpcPeeringConfig vpcName. - * @member {string} vpcName - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.vpcName = ""; - - /** - * VpcPeeringConfig subnet. - * @member {string} subnet - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.subnet = ""; - - /** - * Creates a new VpcPeeringConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IVpcPeeringConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.VpcPeeringConfig} VpcPeeringConfig instance - */ - VpcPeeringConfig.create = function create(properties) { - return new VpcPeeringConfig(properties); - }; - - /** - * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.VpcPeeringConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcPeeringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vpcName != null && Object.hasOwnProperty.call(message, "vpcName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpcName); - if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnet); - return writer; - }; - - /** - * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.VpcPeeringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcPeeringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.VpcPeeringConfig} VpcPeeringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcPeeringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.vpcName = reader.string(); - break; - } - case 2: { - message.subnet = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.VpcPeeringConfig} VpcPeeringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcPeeringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcPeeringConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcPeeringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vpcName != null && message.hasOwnProperty("vpcName")) - if (!$util.isString(message.vpcName)) - return "vpcName: string expected"; - if (message.subnet != null && message.hasOwnProperty("subnet")) - if (!$util.isString(message.subnet)) - return "subnet: string expected"; - return null; - }; - - /** - * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.VpcPeeringConfig} VpcPeeringConfig - */ - VpcPeeringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig(); - if (object.vpcName != null) - message.vpcName = String(object.vpcName); - if (object.subnet != null) - message.subnet = String(object.subnet); - return message; - }; - - /** - * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {google.cloud.datastream.v1alpha1.VpcPeeringConfig} message VpcPeeringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcPeeringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vpcName = ""; - object.subnet = ""; - } - if (message.vpcName != null && message.hasOwnProperty("vpcName")) - object.vpcName = message.vpcName; - if (message.subnet != null && message.hasOwnProperty("subnet")) - object.subnet = message.subnet; - return object; - }; - - /** - * Converts this VpcPeeringConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @instance - * @returns {Object.} JSON object - */ - VpcPeeringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcPeeringConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.VpcPeeringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcPeeringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.VpcPeeringConfig"; - }; - - return VpcPeeringConfig; - })(); - - v1alpha1.PrivateConnection = (function() { - - /** - * Properties of a PrivateConnection. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IPrivateConnection - * @property {string|null} [name] PrivateConnection name - * @property {google.protobuf.ITimestamp|null} [createTime] PrivateConnection createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateConnection updateTime - * @property {Object.|null} [labels] PrivateConnection labels - * @property {string|null} [displayName] PrivateConnection displayName - * @property {google.cloud.datastream.v1alpha1.PrivateConnection.State|null} [state] PrivateConnection state - * @property {google.cloud.datastream.v1alpha1.IError|null} [error] PrivateConnection error - * @property {google.cloud.datastream.v1alpha1.IVpcPeeringConfig|null} [vpcPeeringConfig] PrivateConnection vpcPeeringConfig - */ - - /** - * Constructs a new PrivateConnection. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a PrivateConnection. - * @implements IPrivateConnection - * @constructor - * @param {google.cloud.datastream.v1alpha1.IPrivateConnection=} [properties] Properties to set - */ - function PrivateConnection(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]]; - } - - /** - * PrivateConnection name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.name = ""; - - /** - * PrivateConnection createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.createTime = null; - - /** - * PrivateConnection updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.updateTime = null; - - /** - * PrivateConnection labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.labels = $util.emptyObject; - - /** - * PrivateConnection displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.displayName = ""; - - /** - * PrivateConnection state. - * @member {google.cloud.datastream.v1alpha1.PrivateConnection.State} state - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.state = 0; - - /** - * PrivateConnection error. - * @member {google.cloud.datastream.v1alpha1.IError|null|undefined} error - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.error = null; - - /** - * PrivateConnection vpcPeeringConfig. - * @member {google.cloud.datastream.v1alpha1.IVpcPeeringConfig|null|undefined} vpcPeeringConfig - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.vpcPeeringConfig = null; - - /** - * Creates a new PrivateConnection instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnection=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.PrivateConnection} PrivateConnection instance - */ - PrivateConnection.create = function create(properties) { - return new PrivateConnection(properties); - }; - - /** - * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnection.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnection} message PrivateConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnection.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.cloud.datastream.v1alpha1.Error.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.vpcPeeringConfig != null && Object.hasOwnProperty.call(message, "vpcPeeringConfig")) - $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig.encode(message.vpcPeeringConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnection} message PrivateConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.PrivateConnection} PrivateConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnection.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.PrivateConnection(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.error = $root.google.cloud.datastream.v1alpha1.Error.decode(reader, reader.uint32()); - break; - } - case 100: { - message.vpcPeeringConfig = $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.PrivateConnection} PrivateConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateConnection message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateConnection.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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: - break; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.cloud.datastream.v1alpha1.Error.verify(message.error); - if (error) - return "error." + error; - } - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { - var error = $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig.verify(message.vpcPeeringConfig); - if (error) - return "vpcPeeringConfig." + error; - } - return null; - }; - - /** - * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.PrivateConnection} PrivateConnection - */ - PrivateConnection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.PrivateConnection) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.PrivateConnection(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.PrivateConnection.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.PrivateConnection.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.PrivateConnection.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - 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 "CREATING": - case 1: - message.state = 1; - break; - case "CREATED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.PrivateConnection.error: object expected"); - message.error = $root.google.cloud.datastream.v1alpha1.Error.fromObject(object.error); - } - if (object.vpcPeeringConfig != null) { - if (typeof object.vpcPeeringConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.PrivateConnection.vpcPeeringConfig: object expected"); - message.vpcPeeringConfig = $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig.fromObject(object.vpcPeeringConfig); - } - return message; - }; - - /** - * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {google.cloud.datastream.v1alpha1.PrivateConnection} message PrivateConnection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateConnection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.error = null; - object.vpcPeeringConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1alpha1.PrivateConnection.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1alpha1.PrivateConnection.State[message.state] : message.state; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.cloud.datastream.v1alpha1.Error.toObject(message.error, options); - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) - object.vpcPeeringConfig = $root.google.cloud.datastream.v1alpha1.VpcPeeringConfig.toObject(message.vpcPeeringConfig, options); - return object; - }; - - /** - * Converts this PrivateConnection to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @instance - * @returns {Object.} JSON object - */ - PrivateConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateConnection - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.PrivateConnection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.PrivateConnection"; - }; - - /** - * State enum. - * @name google.cloud.datastream.v1alpha1.PrivateConnection.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} CREATED=2 CREATED value - * @property {number} FAILED=3 FAILED value - */ - PrivateConnection.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "CREATED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return PrivateConnection; - })(); - - v1alpha1.PrivateConnectivity = (function() { - - /** - * Properties of a PrivateConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IPrivateConnectivity - * @property {string|null} [privateConnectionName] PrivateConnectivity privateConnectionName - */ - - /** - * Constructs a new PrivateConnectivity. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a PrivateConnectivity. - * @implements IPrivateConnectivity - * @constructor - * @param {google.cloud.datastream.v1alpha1.IPrivateConnectivity=} [properties] Properties to set - */ - function PrivateConnectivity(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]]; - } - - /** - * PrivateConnectivity privateConnectionName. - * @member {string} privateConnectionName - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @instance - */ - PrivateConnectivity.prototype.privateConnectionName = ""; - - /** - * Creates a new PrivateConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.PrivateConnectivity} PrivateConnectivity instance - */ - PrivateConnectivity.create = function create(properties) { - return new PrivateConnectivity(properties); - }; - - /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateConnectionName != null && Object.hasOwnProperty.call(message, "privateConnectionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.privateConnectionName); - return writer; - }; - - /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.PrivateConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.PrivateConnectivity} PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnectivity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.PrivateConnectivity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.privateConnectionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.PrivateConnectivity} PrivateConnectivity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateConnectivity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateConnectivity message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateConnectivity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateConnectionName != null && message.hasOwnProperty("privateConnectionName")) - if (!$util.isString(message.privateConnectionName)) - return "privateConnectionName: string expected"; - return null; - }; - - /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.PrivateConnectivity} PrivateConnectivity - */ - PrivateConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.PrivateConnectivity) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.PrivateConnectivity(); - if (object.privateConnectionName != null) - message.privateConnectionName = String(object.privateConnectionName); - return message; - }; - - /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {google.cloud.datastream.v1alpha1.PrivateConnectivity} message PrivateConnectivity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateConnectivity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.privateConnectionName = ""; - if (message.privateConnectionName != null && message.hasOwnProperty("privateConnectionName")) - object.privateConnectionName = message.privateConnectionName; - return object; - }; - - /** - * Converts this PrivateConnectivity to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @instance - * @returns {Object.} JSON object - */ - PrivateConnectivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateConnectivity - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.PrivateConnectivity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.PrivateConnectivity"; - }; - - return PrivateConnectivity; - })(); - - v1alpha1.Route = (function() { - - /** - * Properties of a Route. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IRoute - * @property {string|null} [name] Route name - * @property {google.protobuf.ITimestamp|null} [createTime] Route createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Route updateTime - * @property {Object.|null} [labels] Route labels - * @property {string|null} [displayName] Route displayName - * @property {string|null} [destinationAddress] Route destinationAddress - * @property {number|null} [destinationPort] Route destinationPort - */ - - /** - * Constructs a new Route. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a Route. - * @implements IRoute - * @constructor - * @param {google.cloud.datastream.v1alpha1.IRoute=} [properties] Properties to set - */ - function Route(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]]; - } - - /** - * Route name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.name = ""; - - /** - * Route createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.createTime = null; - - /** - * Route updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.updateTime = null; - - /** - * Route labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.labels = $util.emptyObject; - - /** - * Route displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.displayName = ""; - - /** - * Route destinationAddress. - * @member {string} destinationAddress - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.destinationAddress = ""; - - /** - * Route destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - */ - Route.prototype.destinationPort = 0; - - /** - * Creates a new Route instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {google.cloud.datastream.v1alpha1.IRoute=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Route} Route instance - */ - Route.create = function create(properties) { - return new Route(properties); - }; - - /** - * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Route.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {google.cloud.datastream.v1alpha1.IRoute} message Route message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Route.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.destinationAddress != null && Object.hasOwnProperty.call(message, "destinationAddress")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.destinationAddress); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.destinationPort); - return writer; - }; - - /** - * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Route.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {google.cloud.datastream.v1alpha1.IRoute} message Route message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Route.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Route message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Route} Route - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Route.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Route(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.destinationAddress = reader.string(); - break; - } - case 7: { - message.destinationPort = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Route message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Route} Route - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Route.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Route message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Route.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - if (!$util.isString(message.destinationAddress)) - return "destinationAddress: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - return null; - }; - - /** - * Creates a Route message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Route} Route - */ - Route.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Route) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.Route(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Route.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Route.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Route.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.destinationAddress != null) - message.destinationAddress = String(object.destinationAddress); - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - return message; - }; - - /** - * Creates a plain object from a Route message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {google.cloud.datastream.v1alpha1.Route} message Route - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Route.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.destinationAddress = ""; - object.destinationPort = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - object.destinationAddress = message.destinationAddress; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - return object; - }; - - /** - * Converts this Route to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Route - * @instance - * @returns {Object.} JSON object - */ - Route.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Route - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Route - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Route.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Route"; - }; - - return Route; - })(); - - v1alpha1.MysqlSslConfig = (function() { - - /** - * Properties of a MysqlSslConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlSslConfig - * @property {string|null} [clientKey] MysqlSslConfig clientKey - * @property {boolean|null} [clientKeySet] MysqlSslConfig clientKeySet - * @property {string|null} [clientCertificate] MysqlSslConfig clientCertificate - * @property {boolean|null} [clientCertificateSet] MysqlSslConfig clientCertificateSet - * @property {string|null} [caCertificate] MysqlSslConfig caCertificate - * @property {boolean|null} [caCertificateSet] MysqlSslConfig caCertificateSet - */ - - /** - * Constructs a new MysqlSslConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlSslConfig. - * @implements IMysqlSslConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlSslConfig=} [properties] Properties to set - */ - function MysqlSslConfig(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]]; - } - - /** - * MysqlSslConfig clientKey. - * @member {string} clientKey - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientKey = ""; - - /** - * MysqlSslConfig clientKeySet. - * @member {boolean} clientKeySet - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientKeySet = false; - - /** - * MysqlSslConfig clientCertificate. - * @member {string} clientCertificate - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientCertificate = ""; - - /** - * MysqlSslConfig clientCertificateSet. - * @member {boolean} clientCertificateSet - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientCertificateSet = false; - - /** - * MysqlSslConfig caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificate = ""; - - /** - * MysqlSslConfig caCertificateSet. - * @member {boolean} caCertificateSet - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificateSet = false; - - /** - * Creates a new MysqlSslConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSslConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlSslConfig} MysqlSslConfig instance - */ - MysqlSslConfig.create = function create(properties) { - return new MysqlSslConfig(properties); - }; - - /** - * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSslConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSslConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.clientKey); - if (message.clientKeySet != null && Object.hasOwnProperty.call(message, "clientKeySet")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.clientKeySet); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.clientCertificate); - if (message.clientCertificateSet != null && Object.hasOwnProperty.call(message, "clientCertificateSet")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.clientCertificateSet); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.caCertificate); - if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.caCertificateSet); - return writer; - }; - - /** - * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSslConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlSslConfig} MysqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSslConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlSslConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 11: { - message.clientKey = reader.string(); - break; - } - case 12: { - message.clientKeySet = reader.bool(); - break; - } - case 13: { - message.clientCertificate = reader.string(); - break; - } - case 14: { - message.clientCertificateSet = reader.bool(); - break; - } - case 15: { - message.caCertificate = reader.string(); - break; - } - case 16: { - message.caCertificateSet = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlSslConfig} MysqlSslConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSslConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlSslConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlSslConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - if (typeof message.clientKeySet !== "boolean") - return "clientKeySet: boolean expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - if (typeof message.clientCertificateSet !== "boolean") - return "clientCertificateSet: boolean expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - if (typeof message.caCertificateSet !== "boolean") - return "caCertificateSet: boolean expected"; - return null; - }; - - /** - * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlSslConfig} MysqlSslConfig - */ - MysqlSslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlSslConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlSslConfig(); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - if (object.clientKeySet != null) - message.clientKeySet = Boolean(object.clientKeySet); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientCertificateSet != null) - message.clientCertificateSet = Boolean(object.clientCertificateSet); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - if (object.caCertificateSet != null) - message.caCertificateSet = Boolean(object.caCertificateSet); - return message; - }; - - /** - * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlSslConfig} message MysqlSslConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlSslConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientKey = ""; - object.clientKeySet = false; - object.clientCertificate = ""; - object.clientCertificateSet = false; - object.caCertificate = ""; - object.caCertificateSet = false; - } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - object.clientKeySet = message.clientKeySet; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - object.clientCertificateSet = message.clientCertificateSet; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - object.caCertificateSet = message.caCertificateSet; - return object; - }; - - /** - * Converts this MysqlSslConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @instance - * @returns {Object.} JSON object - */ - MysqlSslConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlSslConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlSslConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlSslConfig"; - }; - - return MysqlSslConfig; - })(); - - v1alpha1.ConnectionProfile = (function() { - - /** - * Properties of a ConnectionProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IConnectionProfile - * @property {string|null} [name] ConnectionProfile name - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime - * @property {Object.|null} [labels] ConnectionProfile labels - * @property {string|null} [displayName] ConnectionProfile displayName - * @property {google.cloud.datastream.v1alpha1.IOracleProfile|null} [oracleProfile] ConnectionProfile oracleProfile - * @property {google.cloud.datastream.v1alpha1.IGcsProfile|null} [gcsProfile] ConnectionProfile gcsProfile - * @property {google.cloud.datastream.v1alpha1.IMysqlProfile|null} [mysqlProfile] ConnectionProfile mysqlProfile - * @property {google.cloud.datastream.v1alpha1.INoConnectivitySettings|null} [noConnectivity] ConnectionProfile noConnectivity - * @property {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity|null} [staticServiceIpConnectivity] ConnectionProfile staticServiceIpConnectivity - * @property {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity|null} [forwardSshConnectivity] ConnectionProfile forwardSshConnectivity - * @property {google.cloud.datastream.v1alpha1.IPrivateConnectivity|null} [privateConnectivity] ConnectionProfile privateConnectivity - */ - - /** - * Constructs a new ConnectionProfile. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ConnectionProfile. - * @implements IConnectionProfile - * @constructor - * @param {google.cloud.datastream.v1alpha1.IConnectionProfile=} [properties] Properties to set - */ - function ConnectionProfile(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]]; - } - - /** - * ConnectionProfile name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.name = ""; - - /** - * ConnectionProfile createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.createTime = null; - - /** - * ConnectionProfile updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.updateTime = null; - - /** - * ConnectionProfile labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.labels = $util.emptyObject; - - /** - * ConnectionProfile displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.displayName = ""; - - /** - * ConnectionProfile oracleProfile. - * @member {google.cloud.datastream.v1alpha1.IOracleProfile|null|undefined} oracleProfile - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.oracleProfile = null; - - /** - * ConnectionProfile gcsProfile. - * @member {google.cloud.datastream.v1alpha1.IGcsProfile|null|undefined} gcsProfile - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.gcsProfile = null; - - /** - * ConnectionProfile mysqlProfile. - * @member {google.cloud.datastream.v1alpha1.IMysqlProfile|null|undefined} mysqlProfile - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.mysqlProfile = null; - - /** - * ConnectionProfile noConnectivity. - * @member {google.cloud.datastream.v1alpha1.INoConnectivitySettings|null|undefined} noConnectivity - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.noConnectivity = null; - - /** - * ConnectionProfile staticServiceIpConnectivity. - * @member {google.cloud.datastream.v1alpha1.IStaticServiceIpConnectivity|null|undefined} staticServiceIpConnectivity - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.staticServiceIpConnectivity = null; - - /** - * ConnectionProfile forwardSshConnectivity. - * @member {google.cloud.datastream.v1alpha1.IForwardSshTunnelConnectivity|null|undefined} forwardSshConnectivity - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.forwardSshConnectivity = null; - - /** - * ConnectionProfile privateConnectivity. - * @member {google.cloud.datastream.v1alpha1.IPrivateConnectivity|null|undefined} privateConnectivity - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.privateConnectivity = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConnectionProfile profile. - * @member {"oracleProfile"|"gcsProfile"|"mysqlProfile"|undefined} profile - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - Object.defineProperty(ConnectionProfile.prototype, "profile", { - get: $util.oneOfGetter($oneOfFields = ["oracleProfile", "gcsProfile", "mysqlProfile"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ConnectionProfile connectivity. - * @member {"noConnectivity"|"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"|undefined} connectivity - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - */ - Object.defineProperty(ConnectionProfile.prototype, "connectivity", { - get: $util.oneOfGetter($oneOfFields = ["noConnectivity", "staticServiceIpConnectivity", "forwardSshConnectivity", "privateConnectivity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConnectionProfile instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ConnectionProfile} ConnectionProfile instance - */ - ConnectionProfile.create = function create(properties) { - return new ConnectionProfile(properties); - }; - - /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ConnectionProfile.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IConnectionProfile} message ConnectionProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionProfile.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.oracleProfile != null && Object.hasOwnProperty.call(message, "oracleProfile")) - $root.google.cloud.datastream.v1alpha1.OracleProfile.encode(message.oracleProfile, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.gcsProfile != null && Object.hasOwnProperty.call(message, "gcsProfile")) - $root.google.cloud.datastream.v1alpha1.GcsProfile.encode(message.gcsProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.mysqlProfile != null && Object.hasOwnProperty.call(message, "mysqlProfile")) - $root.google.cloud.datastream.v1alpha1.MysqlProfile.encode(message.mysqlProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.noConnectivity != null && Object.hasOwnProperty.call(message, "noConnectivity")) - $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings.encode(message.noConnectivity, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.staticServiceIpConnectivity != null && Object.hasOwnProperty.call(message, "staticServiceIpConnectivity")) - $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.encode(message.staticServiceIpConnectivity, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.forwardSshConnectivity != null && Object.hasOwnProperty.call(message, "forwardSshConnectivity")) - $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.encode(message.forwardSshConnectivity, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - if (message.privateConnectivity != null && Object.hasOwnProperty.call(message, "privateConnectivity")) - $root.google.cloud.datastream.v1alpha1.PrivateConnectivity.encode(message.privateConnectivity, writer.uint32(/* id 203, wireType 2 =*/1626).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ConnectionProfile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1alpha1.IConnectionProfile} message ConnectionProfile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ConnectionProfile} ConnectionProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionProfile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ConnectionProfile(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 100: { - message.oracleProfile = $root.google.cloud.datastream.v1alpha1.OracleProfile.decode(reader, reader.uint32()); - break; - } - case 101: { - message.gcsProfile = $root.google.cloud.datastream.v1alpha1.GcsProfile.decode(reader, reader.uint32()); - break; - } - case 102: { - message.mysqlProfile = $root.google.cloud.datastream.v1alpha1.MysqlProfile.decode(reader, reader.uint32()); - break; - } - case 200: { - message.noConnectivity = $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings.decode(reader, reader.uint32()); - break; - } - case 201: { - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.decode(reader, reader.uint32()); - break; - } - case 202: { - message.forwardSshConnectivity = $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.decode(reader, reader.uint32()); - break; - } - case 203: { - message.privateConnectivity = $root.google.cloud.datastream.v1alpha1.PrivateConnectivity.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ConnectionProfile} ConnectionProfile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionProfile message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionProfile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.OracleProfile.verify(message.oracleProfile); - if (error) - return "oracleProfile." + error; - } - } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.GcsProfile.verify(message.gcsProfile); - if (error) - return "gcsProfile." + error; - } - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.MysqlProfile.verify(message.mysqlProfile); - if (error) - return "mysqlProfile." + error; - } - } - if (message.noConnectivity != null && message.hasOwnProperty("noConnectivity")) { - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings.verify(message.noConnectivity); - if (error) - return "noConnectivity." + error; - } - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.verify(message.staticServiceIpConnectivity); - if (error) - return "staticServiceIpConnectivity." + error; - } - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.verify(message.forwardSshConnectivity); - if (error) - return "forwardSshConnectivity." + error; - } - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.PrivateConnectivity.verify(message.privateConnectivity); - if (error) - return "privateConnectivity." + error; - } - } - return null; - }; - - /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ConnectionProfile} ConnectionProfile - */ - ConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ConnectionProfile) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ConnectionProfile(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.oracleProfile != null) { - if (typeof object.oracleProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.oracleProfile: object expected"); - message.oracleProfile = $root.google.cloud.datastream.v1alpha1.OracleProfile.fromObject(object.oracleProfile); - } - if (object.gcsProfile != null) { - if (typeof object.gcsProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.gcsProfile: object expected"); - message.gcsProfile = $root.google.cloud.datastream.v1alpha1.GcsProfile.fromObject(object.gcsProfile); - } - if (object.mysqlProfile != null) { - if (typeof object.mysqlProfile !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.mysqlProfile: object expected"); - message.mysqlProfile = $root.google.cloud.datastream.v1alpha1.MysqlProfile.fromObject(object.mysqlProfile); - } - if (object.noConnectivity != null) { - if (typeof object.noConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.noConnectivity: object expected"); - message.noConnectivity = $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings.fromObject(object.noConnectivity); - } - if (object.staticServiceIpConnectivity != null) { - if (typeof object.staticServiceIpConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.staticServiceIpConnectivity: object expected"); - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.fromObject(object.staticServiceIpConnectivity); - } - if (object.forwardSshConnectivity != null) { - if (typeof object.forwardSshConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.forwardSshConnectivity: object expected"); - message.forwardSshConnectivity = $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.fromObject(object.forwardSshConnectivity); - } - if (object.privateConnectivity != null) { - if (typeof object.privateConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ConnectionProfile.privateConnectivity: object expected"); - message.privateConnectivity = $root.google.cloud.datastream.v1alpha1.PrivateConnectivity.fromObject(object.privateConnectivity); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {google.cloud.datastream.v1alpha1.ConnectionProfile} message ConnectionProfile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionProfile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - object.oracleProfile = $root.google.cloud.datastream.v1alpha1.OracleProfile.toObject(message.oracleProfile, options); - if (options.oneofs) - object.profile = "oracleProfile"; - } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - object.gcsProfile = $root.google.cloud.datastream.v1alpha1.GcsProfile.toObject(message.gcsProfile, options); - if (options.oneofs) - object.profile = "gcsProfile"; - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - object.mysqlProfile = $root.google.cloud.datastream.v1alpha1.MysqlProfile.toObject(message.mysqlProfile, options); - if (options.oneofs) - object.profile = "mysqlProfile"; - } - if (message.noConnectivity != null && message.hasOwnProperty("noConnectivity")) { - object.noConnectivity = $root.google.cloud.datastream.v1alpha1.NoConnectivitySettings.toObject(message.noConnectivity, options); - if (options.oneofs) - object.connectivity = "noConnectivity"; - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - object.staticServiceIpConnectivity = $root.google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity.toObject(message.staticServiceIpConnectivity, options); - if (options.oneofs) - object.connectivity = "staticServiceIpConnectivity"; - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - object.forwardSshConnectivity = $root.google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity.toObject(message.forwardSshConnectivity, options); - if (options.oneofs) - object.connectivity = "forwardSshConnectivity"; - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - object.privateConnectivity = $root.google.cloud.datastream.v1alpha1.PrivateConnectivity.toObject(message.privateConnectivity, options); - if (options.oneofs) - object.connectivity = "privateConnectivity"; - } - return object; - }; - - /** - * Converts this ConnectionProfile to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @instance - * @returns {Object.} JSON object - */ - ConnectionProfile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectionProfile - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ConnectionProfile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ConnectionProfile"; - }; - - return ConnectionProfile; - })(); - - v1alpha1.OracleColumn = (function() { - - /** - * Properties of an OracleColumn. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleColumn - * @property {string|null} [columnName] OracleColumn columnName - * @property {string|null} [dataType] OracleColumn dataType - * @property {number|null} [length] OracleColumn length - * @property {number|null} [precision] OracleColumn precision - * @property {number|null} [scale] OracleColumn scale - * @property {string|null} [encoding] OracleColumn encoding - * @property {boolean|null} [primaryKey] OracleColumn primaryKey - * @property {boolean|null} [nullable] OracleColumn nullable - * @property {number|null} [ordinalPosition] OracleColumn ordinalPosition - */ - - /** - * Constructs a new OracleColumn. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleColumn. - * @implements IOracleColumn - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleColumn=} [properties] Properties to set - */ - function OracleColumn(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]]; - } - - /** - * OracleColumn columnName. - * @member {string} columnName - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.columnName = ""; - - /** - * OracleColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.dataType = ""; - - /** - * OracleColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.length = 0; - - /** - * OracleColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.precision = 0; - - /** - * OracleColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.scale = 0; - - /** - * OracleColumn encoding. - * @member {string} encoding - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.encoding = ""; - - /** - * OracleColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.primaryKey = false; - - /** - * OracleColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.nullable = false; - - /** - * OracleColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - */ - OracleColumn.prototype.ordinalPosition = 0; - - /** - * Creates a new OracleColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleColumn} OracleColumn instance - */ - OracleColumn.create = function create(properties) { - return new OracleColumn(properties); - }; - - /** - * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleColumn} message OracleColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columnName != null && Object.hasOwnProperty.call(message, "columnName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnName); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.encoding); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); - return writer; - }; - - /** - * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleColumn} message OracleColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleColumn} OracleColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.columnName = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.precision = reader.int32(); - break; - } - case 5: { - message.scale = reader.int32(); - break; - } - case 6: { - message.encoding = reader.string(); - break; - } - case 7: { - message.primaryKey = reader.bool(); - break; - } - case 8: { - message.nullable = reader.bool(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleColumn} OracleColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleColumn message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columnName != null && message.hasOwnProperty("columnName")) - if (!$util.isString(message.columnName)) - return "columnName: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - return null; - }; - - /** - * Creates an OracleColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleColumn} OracleColumn - */ - OracleColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleColumn) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleColumn(); - if (object.columnName != null) - message.columnName = String(object.columnName); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - return message; - }; - - /** - * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {google.cloud.datastream.v1alpha1.OracleColumn} message OracleColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.columnName = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.encoding = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - } - if (message.columnName != null && message.hasOwnProperty("columnName")) - object.columnName = message.columnName; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - return object; - }; - - /** - * Converts this OracleColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @instance - * @returns {Object.} JSON object - */ - OracleColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleColumn"; - }; - - return OracleColumn; - })(); - - v1alpha1.OracleTable = (function() { - - /** - * Properties of an OracleTable. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleTable - * @property {string|null} [tableName] OracleTable tableName - * @property {Array.|null} [oracleColumns] OracleTable oracleColumns - */ - - /** - * Constructs a new OracleTable. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleTable. - * @implements IOracleTable - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleTable=} [properties] Properties to set - */ - function OracleTable(properties) { - this.oracleColumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleTable tableName. - * @member {string} tableName - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @instance - */ - OracleTable.prototype.tableName = ""; - - /** - * OracleTable oracleColumns. - * @member {Array.} oracleColumns - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @instance - */ - OracleTable.prototype.oracleColumns = $util.emptyArray; - - /** - * Creates a new OracleTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleTable} OracleTable instance - */ - OracleTable.create = function create(properties) { - return new OracleTable(properties); - }; - - /** - * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleTable} message OracleTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.oracleColumns != null && message.oracleColumns.length) - for (var i = 0; i < message.oracleColumns.length; ++i) - $root.google.cloud.datastream.v1alpha1.OracleColumn.encode(message.oracleColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleTable} message OracleTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleTable} OracleTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 2: { - if (!(message.oracleColumns && message.oracleColumns.length)) - message.oracleColumns = []; - message.oracleColumns.push($root.google.cloud.datastream.v1alpha1.OracleColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleTable} OracleTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleTable message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.oracleColumns != null && message.hasOwnProperty("oracleColumns")) { - if (!Array.isArray(message.oracleColumns)) - return "oracleColumns: array expected"; - for (var i = 0; i < message.oracleColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.OracleColumn.verify(message.oracleColumns[i]); - if (error) - return "oracleColumns." + error; - } - } - return null; - }; - - /** - * Creates an OracleTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleTable} OracleTable - */ - OracleTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleTable) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleTable(); - if (object.tableName != null) - message.tableName = String(object.tableName); - if (object.oracleColumns) { - if (!Array.isArray(object.oracleColumns)) - throw TypeError(".google.cloud.datastream.v1alpha1.OracleTable.oracleColumns: array expected"); - message.oracleColumns = []; - for (var i = 0; i < object.oracleColumns.length; ++i) { - if (typeof object.oracleColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleTable.oracleColumns: object expected"); - message.oracleColumns[i] = $root.google.cloud.datastream.v1alpha1.OracleColumn.fromObject(object.oracleColumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {google.cloud.datastream.v1alpha1.OracleTable} message OracleTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleColumns = []; - if (options.defaults) - object.tableName = ""; - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.oracleColumns && message.oracleColumns.length) { - object.oracleColumns = []; - for (var j = 0; j < message.oracleColumns.length; ++j) - object.oracleColumns[j] = $root.google.cloud.datastream.v1alpha1.OracleColumn.toObject(message.oracleColumns[j], options); - } - return object; - }; - - /** - * Converts this OracleTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @instance - * @returns {Object.} JSON object - */ - OracleTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleTable"; - }; - - return OracleTable; - })(); - - v1alpha1.OracleSchema = (function() { - - /** - * Properties of an OracleSchema. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleSchema - * @property {string|null} [schemaName] OracleSchema schemaName - * @property {Array.|null} [oracleTables] OracleSchema oracleTables - */ - - /** - * Constructs a new OracleSchema. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleSchema. - * @implements IOracleSchema - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleSchema=} [properties] Properties to set - */ - function OracleSchema(properties) { - this.oracleTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleSchema schemaName. - * @member {string} schemaName - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @instance - */ - OracleSchema.prototype.schemaName = ""; - - /** - * OracleSchema oracleTables. - * @member {Array.} oracleTables - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @instance - */ - OracleSchema.prototype.oracleTables = $util.emptyArray; - - /** - * Creates a new OracleSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleSchema} OracleSchema instance - */ - OracleSchema.create = function create(properties) { - return new OracleSchema(properties); - }; - - /** - * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSchema} message OracleSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schemaName != null && Object.hasOwnProperty.call(message, "schemaName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaName); - if (message.oracleTables != null && message.oracleTables.length) - for (var i = 0; i < message.oracleTables.length; ++i) - $root.google.cloud.datastream.v1alpha1.OracleTable.encode(message.oracleTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSchema} message OracleSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleSchema} OracleSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schemaName = reader.string(); - break; - } - case 2: { - if (!(message.oracleTables && message.oracleTables.length)) - message.oracleTables = []; - message.oracleTables.push($root.google.cloud.datastream.v1alpha1.OracleTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleSchema} OracleSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleSchema message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemaName != null && message.hasOwnProperty("schemaName")) - if (!$util.isString(message.schemaName)) - return "schemaName: string expected"; - if (message.oracleTables != null && message.hasOwnProperty("oracleTables")) { - if (!Array.isArray(message.oracleTables)) - return "oracleTables: array expected"; - for (var i = 0; i < message.oracleTables.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.OracleTable.verify(message.oracleTables[i]); - if (error) - return "oracleTables." + error; - } - } - return null; - }; - - /** - * Creates an OracleSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleSchema} OracleSchema - */ - OracleSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleSchema) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleSchema(); - if (object.schemaName != null) - message.schemaName = String(object.schemaName); - if (object.oracleTables) { - if (!Array.isArray(object.oracleTables)) - throw TypeError(".google.cloud.datastream.v1alpha1.OracleSchema.oracleTables: array expected"); - message.oracleTables = []; - for (var i = 0; i < object.oracleTables.length; ++i) { - if (typeof object.oracleTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleSchema.oracleTables: object expected"); - message.oracleTables[i] = $root.google.cloud.datastream.v1alpha1.OracleTable.fromObject(object.oracleTables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {google.cloud.datastream.v1alpha1.OracleSchema} message OracleSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleTables = []; - if (options.defaults) - object.schemaName = ""; - if (message.schemaName != null && message.hasOwnProperty("schemaName")) - object.schemaName = message.schemaName; - if (message.oracleTables && message.oracleTables.length) { - object.oracleTables = []; - for (var j = 0; j < message.oracleTables.length; ++j) - object.oracleTables[j] = $root.google.cloud.datastream.v1alpha1.OracleTable.toObject(message.oracleTables[j], options); - } - return object; - }; - - /** - * Converts this OracleSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @instance - * @returns {Object.} JSON object - */ - OracleSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleSchema"; - }; - - return OracleSchema; - })(); - - v1alpha1.OracleRdbms = (function() { - - /** - * Properties of an OracleRdbms. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleRdbms - * @property {Array.|null} [oracleSchemas] OracleRdbms oracleSchemas - */ - - /** - * Constructs a new OracleRdbms. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleRdbms. - * @implements IOracleRdbms - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleRdbms=} [properties] Properties to set - */ - function OracleRdbms(properties) { - this.oracleSchemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OracleRdbms oracleSchemas. - * @member {Array.} oracleSchemas - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @instance - */ - OracleRdbms.prototype.oracleSchemas = $util.emptyArray; - - /** - * Creates a new OracleRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleRdbms} OracleRdbms instance - */ - OracleRdbms.create = function create(properties) { - return new OracleRdbms(properties); - }; - - /** - * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleRdbms} message OracleRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleSchemas != null && message.oracleSchemas.length) - for (var i = 0; i < message.oracleSchemas.length; ++i) - $root.google.cloud.datastream.v1alpha1.OracleSchema.encode(message.oracleSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleRdbms} message OracleRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleRdbms} OracleRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.oracleSchemas && message.oracleSchemas.length)) - message.oracleSchemas = []; - message.oracleSchemas.push($root.google.cloud.datastream.v1alpha1.OracleSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleRdbms} OracleRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.oracleSchemas != null && message.hasOwnProperty("oracleSchemas")) { - if (!Array.isArray(message.oracleSchemas)) - return "oracleSchemas: array expected"; - for (var i = 0; i < message.oracleSchemas.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.OracleSchema.verify(message.oracleSchemas[i]); - if (error) - return "oracleSchemas." + error; - } - } - return null; - }; - - /** - * Creates an OracleRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleRdbms} OracleRdbms - */ - OracleRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleRdbms) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleRdbms(); - if (object.oracleSchemas) { - if (!Array.isArray(object.oracleSchemas)) - throw TypeError(".google.cloud.datastream.v1alpha1.OracleRdbms.oracleSchemas: array expected"); - message.oracleSchemas = []; - for (var i = 0; i < object.oracleSchemas.length; ++i) { - if (typeof object.oracleSchemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleRdbms.oracleSchemas: object expected"); - message.oracleSchemas[i] = $root.google.cloud.datastream.v1alpha1.OracleSchema.fromObject(object.oracleSchemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.OracleRdbms} message OracleRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oracleSchemas = []; - if (message.oracleSchemas && message.oracleSchemas.length) { - object.oracleSchemas = []; - for (var j = 0; j < message.oracleSchemas.length; ++j) - object.oracleSchemas[j] = $root.google.cloud.datastream.v1alpha1.OracleSchema.toObject(message.oracleSchemas[j], options); - } - return object; - }; - - /** - * Converts this OracleRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @instance - * @returns {Object.} JSON object - */ - OracleRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleRdbms"; - }; - - return OracleRdbms; - })(); - - v1alpha1.OracleSourceConfig = (function() { - - /** - * Properties of an OracleSourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IOracleSourceConfig - * @property {google.cloud.datastream.v1alpha1.IOracleRdbms|null} [allowlist] OracleSourceConfig allowlist - * @property {google.cloud.datastream.v1alpha1.IOracleRdbms|null} [rejectlist] OracleSourceConfig rejectlist - */ - - /** - * Constructs a new OracleSourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an OracleSourceConfig. - * @implements IOracleSourceConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IOracleSourceConfig=} [properties] Properties to set - */ - function OracleSourceConfig(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]]; - } - - /** - * OracleSourceConfig allowlist. - * @member {google.cloud.datastream.v1alpha1.IOracleRdbms|null|undefined} allowlist - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.allowlist = null; - - /** - * OracleSourceConfig rejectlist. - * @member {google.cloud.datastream.v1alpha1.IOracleRdbms|null|undefined} rejectlist - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.rejectlist = null; - - /** - * Creates a new OracleSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.OracleSourceConfig} OracleSourceConfig instance - */ - OracleSourceConfig.create = function create(properties) { - return new OracleSourceConfig(properties); - }; - - /** - * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowlist != null && Object.hasOwnProperty.call(message, "allowlist")) - $root.google.cloud.datastream.v1alpha1.OracleRdbms.encode(message.allowlist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rejectlist != null && Object.hasOwnProperty.call(message, "rejectlist")) - $root.google.cloud.datastream.v1alpha1.OracleRdbms.encode(message.rejectlist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.OracleSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.OracleSourceConfig} OracleSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.OracleSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.allowlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.rejectlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.OracleSourceConfig} OracleSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowlist != null && message.hasOwnProperty("allowlist")) { - var error = $root.google.cloud.datastream.v1alpha1.OracleRdbms.verify(message.allowlist); - if (error) - return "allowlist." + error; - } - if (message.rejectlist != null && message.hasOwnProperty("rejectlist")) { - var error = $root.google.cloud.datastream.v1alpha1.OracleRdbms.verify(message.rejectlist); - if (error) - return "rejectlist." + error; - } - return null; - }; - - /** - * Creates an OracleSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.OracleSourceConfig} OracleSourceConfig - */ - OracleSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.OracleSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.OracleSourceConfig(); - if (object.allowlist != null) { - if (typeof object.allowlist !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleSourceConfig.allowlist: object expected"); - message.allowlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.fromObject(object.allowlist); - } - if (object.rejectlist != null) { - if (typeof object.rejectlist !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.OracleSourceConfig.rejectlist: object expected"); - message.rejectlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.fromObject(object.rejectlist); - } - return message; - }; - - /** - * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.OracleSourceConfig} message OracleSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.allowlist = null; - object.rejectlist = null; - } - if (message.allowlist != null && message.hasOwnProperty("allowlist")) - object.allowlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.toObject(message.allowlist, options); - if (message.rejectlist != null && message.hasOwnProperty("rejectlist")) - object.rejectlist = $root.google.cloud.datastream.v1alpha1.OracleRdbms.toObject(message.rejectlist, options); - return object; - }; - - /** - * Converts this OracleSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @instance - * @returns {Object.} JSON object - */ - OracleSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.OracleSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.OracleSourceConfig"; - }; - - return OracleSourceConfig; - })(); - - v1alpha1.MysqlColumn = (function() { - - /** - * Properties of a MysqlColumn. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlColumn - * @property {string|null} [columnName] MysqlColumn columnName - * @property {string|null} [dataType] MysqlColumn dataType - * @property {number|null} [length] MysqlColumn length - * @property {string|null} [collation] MysqlColumn collation - * @property {boolean|null} [primaryKey] MysqlColumn primaryKey - * @property {boolean|null} [nullable] MysqlColumn nullable - * @property {number|null} [ordinalPosition] MysqlColumn ordinalPosition - */ - - /** - * Constructs a new MysqlColumn. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlColumn. - * @implements IMysqlColumn - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlColumn=} [properties] Properties to set - */ - function MysqlColumn(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]]; - } - - /** - * MysqlColumn columnName. - * @member {string} columnName - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.columnName = ""; - - /** - * MysqlColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.dataType = ""; - - /** - * MysqlColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.length = 0; - - /** - * MysqlColumn collation. - * @member {string} collation - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.collation = ""; - - /** - * MysqlColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.primaryKey = false; - - /** - * MysqlColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.nullable = false; - - /** - * MysqlColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.ordinalPosition = 0; - - /** - * Creates a new MysqlColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlColumn} MysqlColumn instance - */ - MysqlColumn.create = function create(properties) { - return new MysqlColumn(properties); - }; - - /** - * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columnName != null && Object.hasOwnProperty.call(message, "columnName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.columnName); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.collation); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.ordinalPosition); - return writer; - }; - - /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.columnName = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.collation = reader.string(); - break; - } - case 5: { - message.primaryKey = reader.bool(); - break; - } - case 6: { - message.nullable = reader.bool(); - break; - } - case 7: { - message.ordinalPosition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlColumn message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columnName != null && message.hasOwnProperty("columnName")) - if (!$util.isString(message.columnName)) - return "columnName: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.collation != null && message.hasOwnProperty("collation")) - if (!$util.isString(message.collation)) - return "collation: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - return null; - }; - - /** - * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlColumn} MysqlColumn - */ - MysqlColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlColumn) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlColumn(); - if (object.columnName != null) - message.columnName = String(object.columnName); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.collation != null) - message.collation = String(object.collation); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - return message; - }; - - /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlColumn} message MysqlColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.columnName = ""; - object.dataType = ""; - object.length = 0; - object.collation = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - } - if (message.columnName != null && message.hasOwnProperty("columnName")) - object.columnName = message.columnName; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.collation != null && message.hasOwnProperty("collation")) - object.collation = message.collation; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - return object; - }; - - /** - * Converts this MysqlColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @instance - * @returns {Object.} JSON object - */ - MysqlColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlColumn"; - }; - - return MysqlColumn; - })(); - - v1alpha1.MysqlTable = (function() { - - /** - * Properties of a MysqlTable. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlTable - * @property {string|null} [tableName] MysqlTable tableName - * @property {Array.|null} [mysqlColumns] MysqlTable mysqlColumns - */ - - /** - * Constructs a new MysqlTable. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlTable. - * @implements IMysqlTable - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlTable=} [properties] Properties to set - */ - function MysqlTable(properties) { - this.mysqlColumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlTable tableName. - * @member {string} tableName - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @instance - */ - MysqlTable.prototype.tableName = ""; - - /** - * MysqlTable mysqlColumns. - * @member {Array.} mysqlColumns - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @instance - */ - MysqlTable.prototype.mysqlColumns = $util.emptyArray; - - /** - * Creates a new MysqlTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlTable} MysqlTable instance - */ - MysqlTable.create = function create(properties) { - return new MysqlTable(properties); - }; - - /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.mysqlColumns != null && message.mysqlColumns.length) - for (var i = 0; i < message.mysqlColumns.length; ++i) - $root.google.cloud.datastream.v1alpha1.MysqlColumn.encode(message.mysqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlTable} MysqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableName = reader.string(); - break; - } - case 2: { - if (!(message.mysqlColumns && message.mysqlColumns.length)) - message.mysqlColumns = []; - message.mysqlColumns.push($root.google.cloud.datastream.v1alpha1.MysqlColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlTable} MysqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlTable message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) - if (!$util.isString(message.tableName)) - return "tableName: string expected"; - if (message.mysqlColumns != null && message.hasOwnProperty("mysqlColumns")) { - if (!Array.isArray(message.mysqlColumns)) - return "mysqlColumns: array expected"; - for (var i = 0; i < message.mysqlColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlColumn.verify(message.mysqlColumns[i]); - if (error) - return "mysqlColumns." + error; - } - } - return null; - }; - - /** - * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlTable} MysqlTable - */ - MysqlTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlTable) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlTable(); - if (object.tableName != null) - message.tableName = String(object.tableName); - if (object.mysqlColumns) { - if (!Array.isArray(object.mysqlColumns)) - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlTable.mysqlColumns: array expected"); - message.mysqlColumns = []; - for (var i = 0; i < object.mysqlColumns.length; ++i) { - if (typeof object.mysqlColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlTable.mysqlColumns: object expected"); - message.mysqlColumns[i] = $root.google.cloud.datastream.v1alpha1.MysqlColumn.fromObject(object.mysqlColumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlTable} message MysqlTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlColumns = []; - if (options.defaults) - object.tableName = ""; - if (message.tableName != null && message.hasOwnProperty("tableName")) - object.tableName = message.tableName; - if (message.mysqlColumns && message.mysqlColumns.length) { - object.mysqlColumns = []; - for (var j = 0; j < message.mysqlColumns.length; ++j) - object.mysqlColumns[j] = $root.google.cloud.datastream.v1alpha1.MysqlColumn.toObject(message.mysqlColumns[j], options); - } - return object; - }; - - /** - * Converts this MysqlTable to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @instance - * @returns {Object.} JSON object - */ - MysqlTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlTable - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlTable"; - }; - - return MysqlTable; - })(); - - v1alpha1.MysqlDatabase = (function() { - - /** - * Properties of a MysqlDatabase. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlDatabase - * @property {string|null} [databaseName] MysqlDatabase databaseName - * @property {Array.|null} [mysqlTables] MysqlDatabase mysqlTables - */ - - /** - * Constructs a new MysqlDatabase. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlDatabase. - * @implements IMysqlDatabase - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlDatabase=} [properties] Properties to set - */ - function MysqlDatabase(properties) { - this.mysqlTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlDatabase databaseName. - * @member {string} databaseName - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @instance - */ - MysqlDatabase.prototype.databaseName = ""; - - /** - * MysqlDatabase mysqlTables. - * @member {Array.} mysqlTables - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @instance - */ - MysqlDatabase.prototype.mysqlTables = $util.emptyArray; - - /** - * Creates a new MysqlDatabase instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlDatabase=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlDatabase} MysqlDatabase instance - */ - MysqlDatabase.create = function create(properties) { - return new MysqlDatabase(properties); - }; - - /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlDatabase.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlDatabase} message MysqlDatabase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlDatabase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.databaseName != null && Object.hasOwnProperty.call(message, "databaseName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.databaseName); - if (message.mysqlTables != null && message.mysqlTables.length) - for (var i = 0; i < message.mysqlTables.length; ++i) - $root.google.cloud.datastream.v1alpha1.MysqlTable.encode(message.mysqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlDatabase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlDatabase} message MysqlDatabase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlDatabase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlDatabase} MysqlDatabase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlDatabase.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlDatabase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.databaseName = reader.string(); - break; - } - case 2: { - if (!(message.mysqlTables && message.mysqlTables.length)) - message.mysqlTables = []; - message.mysqlTables.push($root.google.cloud.datastream.v1alpha1.MysqlTable.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlDatabase} MysqlDatabase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlDatabase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlDatabase message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlDatabase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.databaseName != null && message.hasOwnProperty("databaseName")) - if (!$util.isString(message.databaseName)) - return "databaseName: string expected"; - if (message.mysqlTables != null && message.hasOwnProperty("mysqlTables")) { - if (!Array.isArray(message.mysqlTables)) - return "mysqlTables: array expected"; - for (var i = 0; i < message.mysqlTables.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlTable.verify(message.mysqlTables[i]); - if (error) - return "mysqlTables." + error; - } - } - return null; - }; - - /** - * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlDatabase} MysqlDatabase - */ - MysqlDatabase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlDatabase) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlDatabase(); - if (object.databaseName != null) - message.databaseName = String(object.databaseName); - if (object.mysqlTables) { - if (!Array.isArray(object.mysqlTables)) - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlDatabase.mysqlTables: array expected"); - message.mysqlTables = []; - for (var i = 0; i < object.mysqlTables.length; ++i) { - if (typeof object.mysqlTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlDatabase.mysqlTables: object expected"); - message.mysqlTables[i] = $root.google.cloud.datastream.v1alpha1.MysqlTable.fromObject(object.mysqlTables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlDatabase} message MysqlDatabase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlDatabase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlTables = []; - if (options.defaults) - object.databaseName = ""; - if (message.databaseName != null && message.hasOwnProperty("databaseName")) - object.databaseName = message.databaseName; - if (message.mysqlTables && message.mysqlTables.length) { - object.mysqlTables = []; - for (var j = 0; j < message.mysqlTables.length; ++j) - object.mysqlTables[j] = $root.google.cloud.datastream.v1alpha1.MysqlTable.toObject(message.mysqlTables[j], options); - } - return object; - }; - - /** - * Converts this MysqlDatabase to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @instance - * @returns {Object.} JSON object - */ - MysqlDatabase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlDatabase - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlDatabase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlDatabase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlDatabase"; - }; - - return MysqlDatabase; - })(); - - v1alpha1.MysqlRdbms = (function() { - - /** - * Properties of a MysqlRdbms. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlRdbms - * @property {Array.|null} [mysqlDatabases] MysqlRdbms mysqlDatabases - */ - - /** - * Constructs a new MysqlRdbms. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlRdbms. - * @implements IMysqlRdbms - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlRdbms=} [properties] Properties to set - */ - function MysqlRdbms(properties) { - this.mysqlDatabases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MysqlRdbms mysqlDatabases. - * @member {Array.} mysqlDatabases - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @instance - */ - MysqlRdbms.prototype.mysqlDatabases = $util.emptyArray; - - /** - * Creates a new MysqlRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlRdbms} MysqlRdbms instance - */ - MysqlRdbms.create = function create(properties) { - return new MysqlRdbms(properties); - }; - - /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlRdbms} message MysqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mysqlDatabases != null && message.mysqlDatabases.length) - for (var i = 0; i < message.mysqlDatabases.length; ++i) - $root.google.cloud.datastream.v1alpha1.MysqlDatabase.encode(message.mysqlDatabases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlRdbms} message MysqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlRdbms} MysqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlRdbms.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.mysqlDatabases && message.mysqlDatabases.length)) - message.mysqlDatabases = []; - message.mysqlDatabases.push($root.google.cloud.datastream.v1alpha1.MysqlDatabase.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlRdbms} MysqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mysqlDatabases != null && message.hasOwnProperty("mysqlDatabases")) { - if (!Array.isArray(message.mysqlDatabases)) - return "mysqlDatabases: array expected"; - for (var i = 0; i < message.mysqlDatabases.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlDatabase.verify(message.mysqlDatabases[i]); - if (error) - return "mysqlDatabases." + error; - } - } - return null; - }; - - /** - * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlRdbms} MysqlRdbms - */ - MysqlRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlRdbms) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlRdbms(); - if (object.mysqlDatabases) { - if (!Array.isArray(object.mysqlDatabases)) - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlRdbms.mysqlDatabases: array expected"); - message.mysqlDatabases = []; - for (var i = 0; i < object.mysqlDatabases.length; ++i) { - if (typeof object.mysqlDatabases[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlRdbms.mysqlDatabases: object expected"); - message.mysqlDatabases[i] = $root.google.cloud.datastream.v1alpha1.MysqlDatabase.fromObject(object.mysqlDatabases[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlRdbms} message MysqlRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mysqlDatabases = []; - if (message.mysqlDatabases && message.mysqlDatabases.length) { - object.mysqlDatabases = []; - for (var j = 0; j < message.mysqlDatabases.length; ++j) - object.mysqlDatabases[j] = $root.google.cloud.datastream.v1alpha1.MysqlDatabase.toObject(message.mysqlDatabases[j], options); - } - return object; - }; - - /** - * Converts this MysqlRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @instance - * @returns {Object.} JSON object - */ - MysqlRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlRdbms"; - }; - - return MysqlRdbms; - })(); - - v1alpha1.MysqlSourceConfig = (function() { - - /** - * Properties of a MysqlSourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IMysqlSourceConfig - * @property {google.cloud.datastream.v1alpha1.IMysqlRdbms|null} [allowlist] MysqlSourceConfig allowlist - * @property {google.cloud.datastream.v1alpha1.IMysqlRdbms|null} [rejectlist] MysqlSourceConfig rejectlist - */ - - /** - * Constructs a new MysqlSourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a MysqlSourceConfig. - * @implements IMysqlSourceConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IMysqlSourceConfig=} [properties] Properties to set - */ - function MysqlSourceConfig(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]]; - } - - /** - * MysqlSourceConfig allowlist. - * @member {google.cloud.datastream.v1alpha1.IMysqlRdbms|null|undefined} allowlist - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.allowlist = null; - - /** - * MysqlSourceConfig rejectlist. - * @member {google.cloud.datastream.v1alpha1.IMysqlRdbms|null|undefined} rejectlist - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.rejectlist = null; - - /** - * Creates a new MysqlSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.MysqlSourceConfig} MysqlSourceConfig instance - */ - MysqlSourceConfig.create = function create(properties) { - return new MysqlSourceConfig(properties); - }; - - /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowlist != null && Object.hasOwnProperty.call(message, "allowlist")) - $root.google.cloud.datastream.v1alpha1.MysqlRdbms.encode(message.allowlist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rejectlist != null && Object.hasOwnProperty.call(message, "rejectlist")) - $root.google.cloud.datastream.v1alpha1.MysqlRdbms.encode(message.rejectlist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.MysqlSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.MysqlSourceConfig} MysqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.allowlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.rejectlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.MysqlSourceConfig} MysqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowlist != null && message.hasOwnProperty("allowlist")) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.verify(message.allowlist); - if (error) - return "allowlist." + error; - } - if (message.rejectlist != null && message.hasOwnProperty("rejectlist")) { - var error = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.verify(message.rejectlist); - if (error) - return "rejectlist." + error; - } - return null; - }; - - /** - * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.MysqlSourceConfig} MysqlSourceConfig - */ - MysqlSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig(); - if (object.allowlist != null) { - if (typeof object.allowlist !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlSourceConfig.allowlist: object expected"); - message.allowlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.fromObject(object.allowlist); - } - if (object.rejectlist != null) { - if (typeof object.rejectlist !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.MysqlSourceConfig.rejectlist: object expected"); - message.rejectlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.fromObject(object.rejectlist); - } - return message; - }; - - /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.MysqlSourceConfig} message MysqlSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.allowlist = null; - object.rejectlist = null; - } - if (message.allowlist != null && message.hasOwnProperty("allowlist")) - object.allowlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.toObject(message.allowlist, options); - if (message.rejectlist != null && message.hasOwnProperty("rejectlist")) - object.rejectlist = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.toObject(message.rejectlist, options); - return object; - }; - - /** - * Converts this MysqlSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @instance - * @returns {Object.} JSON object - */ - MysqlSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MysqlSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.MysqlSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.MysqlSourceConfig"; - }; - - return MysqlSourceConfig; - })(); - - v1alpha1.SourceConfig = (function() { - - /** - * Properties of a SourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface ISourceConfig - * @property {string|null} [sourceConnectionProfileName] SourceConfig sourceConnectionProfileName - * @property {google.cloud.datastream.v1alpha1.IOracleSourceConfig|null} [oracleSourceConfig] SourceConfig oracleSourceConfig - * @property {google.cloud.datastream.v1alpha1.IMysqlSourceConfig|null} [mysqlSourceConfig] SourceConfig mysqlSourceConfig - */ - - /** - * Constructs a new SourceConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a SourceConfig. - * @implements ISourceConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.ISourceConfig=} [properties] Properties to set - */ - function SourceConfig(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]]; - } - - /** - * SourceConfig sourceConnectionProfileName. - * @member {string} sourceConnectionProfileName - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @instance - */ - SourceConfig.prototype.sourceConnectionProfileName = ""; - - /** - * SourceConfig oracleSourceConfig. - * @member {google.cloud.datastream.v1alpha1.IOracleSourceConfig|null|undefined} oracleSourceConfig - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @instance - */ - SourceConfig.prototype.oracleSourceConfig = null; - - /** - * SourceConfig mysqlSourceConfig. - * @member {google.cloud.datastream.v1alpha1.IMysqlSourceConfig|null|undefined} mysqlSourceConfig - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @instance - */ - SourceConfig.prototype.mysqlSourceConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SourceConfig sourceStreamConfig. - * @member {"oracleSourceConfig"|"mysqlSourceConfig"|undefined} sourceStreamConfig - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @instance - */ - Object.defineProperty(SourceConfig.prototype, "sourceStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["oracleSourceConfig", "mysqlSourceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.ISourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.SourceConfig} SourceConfig instance - */ - SourceConfig.create = function create(properties) { - return new SourceConfig(properties); - }; - - /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.SourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.ISourceConfig} message SourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceConnectionProfileName != null && Object.hasOwnProperty.call(message, "sourceConnectionProfileName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceConnectionProfileName); - if (message.oracleSourceConfig != null && Object.hasOwnProperty.call(message, "oracleSourceConfig")) - $root.google.cloud.datastream.v1alpha1.OracleSourceConfig.encode(message.oracleSourceConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlSourceConfig != null && Object.hasOwnProperty.call(message, "mysqlSourceConfig")) - $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig.encode(message.mysqlSourceConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.SourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.ISourceConfig} message SourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.SourceConfig} SourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.SourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceConnectionProfileName = reader.string(); - break; - } - case 100: { - message.oracleSourceConfig = $root.google.cloud.datastream.v1alpha1.OracleSourceConfig.decode(reader, reader.uint32()); - break; - } - case 101: { - message.mysqlSourceConfig = $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.SourceConfig} SourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceConnectionProfileName != null && message.hasOwnProperty("sourceConnectionProfileName")) - if (!$util.isString(message.sourceConnectionProfileName)) - return "sourceConnectionProfileName: string expected"; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.OracleSourceConfig.verify(message.oracleSourceConfig); - if (error) - return "oracleSourceConfig." + error; - } - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig.verify(message.mysqlSourceConfig); - if (error) - return "mysqlSourceConfig." + error; - } - } - return null; - }; - - /** - * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.SourceConfig} SourceConfig - */ - SourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.SourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.SourceConfig(); - if (object.sourceConnectionProfileName != null) - message.sourceConnectionProfileName = String(object.sourceConnectionProfileName); - if (object.oracleSourceConfig != null) { - if (typeof object.oracleSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.SourceConfig.oracleSourceConfig: object expected"); - message.oracleSourceConfig = $root.google.cloud.datastream.v1alpha1.OracleSourceConfig.fromObject(object.oracleSourceConfig); - } - if (object.mysqlSourceConfig != null) { - if (typeof object.mysqlSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.SourceConfig.mysqlSourceConfig: object expected"); - message.mysqlSourceConfig = $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig.fromObject(object.mysqlSourceConfig); - } - return message; - }; - - /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {google.cloud.datastream.v1alpha1.SourceConfig} message SourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sourceConnectionProfileName = ""; - if (message.sourceConnectionProfileName != null && message.hasOwnProperty("sourceConnectionProfileName")) - object.sourceConnectionProfileName = message.sourceConnectionProfileName; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - object.oracleSourceConfig = $root.google.cloud.datastream.v1alpha1.OracleSourceConfig.toObject(message.oracleSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "oracleSourceConfig"; - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - object.mysqlSourceConfig = $root.google.cloud.datastream.v1alpha1.MysqlSourceConfig.toObject(message.mysqlSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "mysqlSourceConfig"; - } - return object; - }; - - /** - * Converts this SourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @instance - * @returns {Object.} JSON object - */ - SourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.SourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.SourceConfig"; - }; - - return SourceConfig; - })(); - - v1alpha1.AvroFileFormat = (function() { - - /** - * Properties of an AvroFileFormat. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IAvroFileFormat - */ - - /** - * Constructs a new AvroFileFormat. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an AvroFileFormat. - * @implements IAvroFileFormat - * @constructor - * @param {google.cloud.datastream.v1alpha1.IAvroFileFormat=} [properties] Properties to set - */ - function AvroFileFormat(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 AvroFileFormat instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IAvroFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.AvroFileFormat} AvroFileFormat instance - */ - AvroFileFormat.create = function create(properties) { - return new AvroFileFormat(properties); - }; - - /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1alpha1.AvroFileFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IAvroFileFormat} message AvroFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFileFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.AvroFileFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IAvroFileFormat} message AvroFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFileFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.AvroFileFormat} AvroFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFileFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.AvroFileFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.AvroFileFormat} AvroFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFileFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroFileFormat message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroFileFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AvroFileFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.AvroFileFormat} AvroFileFormat - */ - AvroFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.AvroFileFormat) - return object; - return new $root.google.cloud.datastream.v1alpha1.AvroFileFormat(); - }; - - /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.AvroFileFormat} message AvroFileFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroFileFormat.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AvroFileFormat to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @instance - * @returns {Object.} JSON object - */ - AvroFileFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroFileFormat - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.AvroFileFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.AvroFileFormat"; - }; - - return AvroFileFormat; - })(); - - /** - * GcsFileFormat enum. - * @name google.cloud.datastream.v1alpha1.GcsFileFormat - * @enum {number} - * @property {number} GCS_FILE_FORMAT_UNSPECIFIED=0 GCS_FILE_FORMAT_UNSPECIFIED value - * @property {number} AVRO=1 AVRO value - */ - v1alpha1.GcsFileFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GCS_FILE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "AVRO"] = 1; - return values; - })(); - - /** - * SchemaFileFormat enum. - * @name google.cloud.datastream.v1alpha1.SchemaFileFormat - * @enum {number} - * @property {number} SCHEMA_FILE_FORMAT_UNSPECIFIED=0 SCHEMA_FILE_FORMAT_UNSPECIFIED value - * @property {number} NO_SCHEMA_FILE=1 NO_SCHEMA_FILE value - * @property {number} AVRO_SCHEMA_FILE=2 AVRO_SCHEMA_FILE value - */ - v1alpha1.SchemaFileFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_FILE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_SCHEMA_FILE"] = 1; - values[valuesById[2] = "AVRO_SCHEMA_FILE"] = 2; - return values; - })(); - - v1alpha1.JsonFileFormat = (function() { - - /** - * Properties of a JsonFileFormat. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IJsonFileFormat - * @property {google.cloud.datastream.v1alpha1.SchemaFileFormat|null} [schemaFileFormat] JsonFileFormat schemaFileFormat - * @property {google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression|null} [compression] JsonFileFormat compression - */ - - /** - * Constructs a new JsonFileFormat. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a JsonFileFormat. - * @implements IJsonFileFormat - * @constructor - * @param {google.cloud.datastream.v1alpha1.IJsonFileFormat=} [properties] Properties to set - */ - function JsonFileFormat(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]]; - } - - /** - * JsonFileFormat schemaFileFormat. - * @member {google.cloud.datastream.v1alpha1.SchemaFileFormat} schemaFileFormat - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @instance - */ - JsonFileFormat.prototype.schemaFileFormat = 0; - - /** - * JsonFileFormat compression. - * @member {google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression} compression - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @instance - */ - JsonFileFormat.prototype.compression = 0; - - /** - * Creates a new JsonFileFormat instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IJsonFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.JsonFileFormat} JsonFileFormat instance - */ - JsonFileFormat.create = function create(properties) { - return new JsonFileFormat(properties); - }; - - /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1alpha1.JsonFileFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IJsonFileFormat} message JsonFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonFileFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schemaFileFormat != null && Object.hasOwnProperty.call(message, "schemaFileFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.schemaFileFormat); - if (message.compression != null && Object.hasOwnProperty.call(message, "compression")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compression); - return writer; - }; - - /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.JsonFileFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.IJsonFileFormat} message JsonFileFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonFileFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.JsonFileFormat} JsonFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonFileFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.JsonFileFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schemaFileFormat = reader.int32(); - break; - } - case 2: { - message.compression = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.JsonFileFormat} JsonFileFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonFileFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonFileFormat message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonFileFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - switch (message.schemaFileFormat) { - default: - return "schemaFileFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.compression != null && message.hasOwnProperty("compression")) - switch (message.compression) { - default: - return "compression: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.JsonFileFormat} JsonFileFormat - */ - JsonFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.JsonFileFormat) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.JsonFileFormat(); - switch (object.schemaFileFormat) { - default: - if (typeof object.schemaFileFormat === "number") { - message.schemaFileFormat = object.schemaFileFormat; - break; - } - break; - case "SCHEMA_FILE_FORMAT_UNSPECIFIED": - case 0: - message.schemaFileFormat = 0; - break; - case "NO_SCHEMA_FILE": - case 1: - message.schemaFileFormat = 1; - break; - case "AVRO_SCHEMA_FILE": - case 2: - message.schemaFileFormat = 2; - break; - } - switch (object.compression) { - default: - if (typeof object.compression === "number") { - message.compression = object.compression; - break; - } - break; - case "JSON_COMPRESSION_UNSPECIFIED": - case 0: - message.compression = 0; - break; - case "NO_COMPRESSION": - case 1: - message.compression = 1; - break; - case "GZIP": - case 2: - message.compression = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {google.cloud.datastream.v1alpha1.JsonFileFormat} message JsonFileFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonFileFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schemaFileFormat = options.enums === String ? "SCHEMA_FILE_FORMAT_UNSPECIFIED" : 0; - object.compression = options.enums === String ? "JSON_COMPRESSION_UNSPECIFIED" : 0; - } - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - object.schemaFileFormat = options.enums === String ? $root.google.cloud.datastream.v1alpha1.SchemaFileFormat[message.schemaFileFormat] === undefined ? message.schemaFileFormat : $root.google.cloud.datastream.v1alpha1.SchemaFileFormat[message.schemaFileFormat] : message.schemaFileFormat; - if (message.compression != null && message.hasOwnProperty("compression")) - object.compression = options.enums === String ? $root.google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression[message.compression] === undefined ? message.compression : $root.google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression[message.compression] : message.compression; - return object; - }; - - /** - * Converts this JsonFileFormat to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @instance - * @returns {Object.} JSON object - */ - JsonFileFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonFileFormat - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.JsonFileFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.JsonFileFormat"; - }; - - /** - * JsonCompression enum. - * @name google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression - * @enum {number} - * @property {number} JSON_COMPRESSION_UNSPECIFIED=0 JSON_COMPRESSION_UNSPECIFIED value - * @property {number} NO_COMPRESSION=1 NO_COMPRESSION value - * @property {number} GZIP=2 GZIP value - */ - JsonFileFormat.JsonCompression = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_COMPRESSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_COMPRESSION"] = 1; - values[valuesById[2] = "GZIP"] = 2; - return values; - })(); - - return JsonFileFormat; - })(); - - v1alpha1.GcsDestinationConfig = (function() { - - /** - * Properties of a GcsDestinationConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IGcsDestinationConfig - * @property {string|null} [path] GcsDestinationConfig path - * @property {google.cloud.datastream.v1alpha1.GcsFileFormat|null} [gcsFileFormat] GcsDestinationConfig gcsFileFormat - * @property {number|null} [fileRotationMb] GcsDestinationConfig fileRotationMb - * @property {google.protobuf.IDuration|null} [fileRotationInterval] GcsDestinationConfig fileRotationInterval - * @property {google.cloud.datastream.v1alpha1.IAvroFileFormat|null} [avroFileFormat] GcsDestinationConfig avroFileFormat - * @property {google.cloud.datastream.v1alpha1.IJsonFileFormat|null} [jsonFileFormat] GcsDestinationConfig jsonFileFormat - */ - - /** - * Constructs a new GcsDestinationConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a GcsDestinationConfig. - * @implements IGcsDestinationConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IGcsDestinationConfig=} [properties] Properties to set - */ - function GcsDestinationConfig(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]]; - } - - /** - * GcsDestinationConfig path. - * @member {string} path - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.path = ""; - - /** - * GcsDestinationConfig gcsFileFormat. - * @member {google.cloud.datastream.v1alpha1.GcsFileFormat} gcsFileFormat - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.gcsFileFormat = 0; - - /** - * GcsDestinationConfig fileRotationMb. - * @member {number} fileRotationMb - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationMb = 0; - - /** - * GcsDestinationConfig fileRotationInterval. - * @member {google.protobuf.IDuration|null|undefined} fileRotationInterval - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationInterval = null; - - /** - * GcsDestinationConfig avroFileFormat. - * @member {google.cloud.datastream.v1alpha1.IAvroFileFormat|null|undefined} avroFileFormat - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.avroFileFormat = null; - - /** - * GcsDestinationConfig jsonFileFormat. - * @member {google.cloud.datastream.v1alpha1.IJsonFileFormat|null|undefined} jsonFileFormat - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.jsonFileFormat = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GcsDestinationConfig fileFormat. - * @member {"avroFileFormat"|"jsonFileFormat"|undefined} fileFormat - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - */ - Object.defineProperty(GcsDestinationConfig.prototype, "fileFormat", { - get: $util.oneOfGetter($oneOfFields = ["avroFileFormat", "jsonFileFormat"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GcsDestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.GcsDestinationConfig} GcsDestinationConfig instance - */ - GcsDestinationConfig.create = function create(properties) { - return new GcsDestinationConfig(properties); - }; - - /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsDestinationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestinationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.gcsFileFormat != null && Object.hasOwnProperty.call(message, "gcsFileFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gcsFileFormat); - if (message.fileRotationMb != null && Object.hasOwnProperty.call(message, "fileRotationMb")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fileRotationMb); - if (message.fileRotationInterval != null && Object.hasOwnProperty.call(message, "fileRotationInterval")) - $root.google.protobuf.Duration.encode(message.fileRotationInterval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.avroFileFormat != null && Object.hasOwnProperty.call(message, "avroFileFormat")) - $root.google.cloud.datastream.v1alpha1.AvroFileFormat.encode(message.avroFileFormat, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.jsonFileFormat != null && Object.hasOwnProperty.call(message, "jsonFileFormat")) - $root.google.cloud.datastream.v1alpha1.JsonFileFormat.encode(message.jsonFileFormat, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.GcsDestinationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.GcsDestinationConfig} GcsDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestinationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.path = reader.string(); - break; - } - case 2: { - message.gcsFileFormat = reader.int32(); - break; - } - case 3: { - message.fileRotationMb = reader.int32(); - break; - } - case 4: { - message.fileRotationInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 100: { - message.avroFileFormat = $root.google.cloud.datastream.v1alpha1.AvroFileFormat.decode(reader, reader.uint32()); - break; - } - case 101: { - message.jsonFileFormat = $root.google.cloud.datastream.v1alpha1.JsonFileFormat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.GcsDestinationConfig} GcsDestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestinationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsDestinationConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsDestinationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.gcsFileFormat != null && message.hasOwnProperty("gcsFileFormat")) - switch (message.gcsFileFormat) { - default: - return "gcsFileFormat: enum value expected"; - case 0: - case 1: - break; - } - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - if (!$util.isInteger(message.fileRotationMb)) - return "fileRotationMb: integer expected"; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) { - var error = $root.google.protobuf.Duration.verify(message.fileRotationInterval); - if (error) - return "fileRotationInterval." + error; - } - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.AvroFileFormat.verify(message.avroFileFormat); - if (error) - return "avroFileFormat." + error; - } - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - if (properties.fileFormat === 1) - return "fileFormat: multiple values"; - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.JsonFileFormat.verify(message.jsonFileFormat); - if (error) - return "jsonFileFormat." + error; - } - } - return null; - }; - - /** - * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.GcsDestinationConfig} GcsDestinationConfig - */ - GcsDestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig(); - if (object.path != null) - message.path = String(object.path); - switch (object.gcsFileFormat) { - default: - if (typeof object.gcsFileFormat === "number") { - message.gcsFileFormat = object.gcsFileFormat; - break; - } - break; - case "GCS_FILE_FORMAT_UNSPECIFIED": - case 0: - message.gcsFileFormat = 0; - break; - case "AVRO": - case 1: - message.gcsFileFormat = 1; - break; - } - if (object.fileRotationMb != null) - message.fileRotationMb = object.fileRotationMb | 0; - if (object.fileRotationInterval != null) { - if (typeof object.fileRotationInterval !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.GcsDestinationConfig.fileRotationInterval: object expected"); - message.fileRotationInterval = $root.google.protobuf.Duration.fromObject(object.fileRotationInterval); - } - if (object.avroFileFormat != null) { - if (typeof object.avroFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.GcsDestinationConfig.avroFileFormat: object expected"); - message.avroFileFormat = $root.google.cloud.datastream.v1alpha1.AvroFileFormat.fromObject(object.avroFileFormat); - } - if (object.jsonFileFormat != null) { - if (typeof object.jsonFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.GcsDestinationConfig.jsonFileFormat: object expected"); - message.jsonFileFormat = $root.google.cloud.datastream.v1alpha1.JsonFileFormat.fromObject(object.jsonFileFormat); - } - return message; - }; - - /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.GcsDestinationConfig} message GcsDestinationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsDestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - object.gcsFileFormat = options.enums === String ? "GCS_FILE_FORMAT_UNSPECIFIED" : 0; - object.fileRotationMb = 0; - object.fileRotationInterval = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.gcsFileFormat != null && message.hasOwnProperty("gcsFileFormat")) - object.gcsFileFormat = options.enums === String ? $root.google.cloud.datastream.v1alpha1.GcsFileFormat[message.gcsFileFormat] === undefined ? message.gcsFileFormat : $root.google.cloud.datastream.v1alpha1.GcsFileFormat[message.gcsFileFormat] : message.gcsFileFormat; - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - object.fileRotationMb = message.fileRotationMb; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) - object.fileRotationInterval = $root.google.protobuf.Duration.toObject(message.fileRotationInterval, options); - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - object.avroFileFormat = $root.google.cloud.datastream.v1alpha1.AvroFileFormat.toObject(message.avroFileFormat, options); - if (options.oneofs) - object.fileFormat = "avroFileFormat"; - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - object.jsonFileFormat = $root.google.cloud.datastream.v1alpha1.JsonFileFormat.toObject(message.jsonFileFormat, options); - if (options.oneofs) - object.fileFormat = "jsonFileFormat"; - } - return object; - }; - - /** - * Converts this GcsDestinationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @instance - * @returns {Object.} JSON object - */ - GcsDestinationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsDestinationConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.GcsDestinationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.GcsDestinationConfig"; - }; - - return GcsDestinationConfig; - })(); - - v1alpha1.DestinationConfig = (function() { - - /** - * Properties of a DestinationConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IDestinationConfig - * @property {string|null} [destinationConnectionProfileName] DestinationConfig destinationConnectionProfileName - * @property {google.cloud.datastream.v1alpha1.IGcsDestinationConfig|null} [gcsDestinationConfig] DestinationConfig gcsDestinationConfig - */ - - /** - * Constructs a new DestinationConfig. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a DestinationConfig. - * @implements IDestinationConfig - * @constructor - * @param {google.cloud.datastream.v1alpha1.IDestinationConfig=} [properties] Properties to set - */ - function DestinationConfig(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]]; - } - - /** - * DestinationConfig destinationConnectionProfileName. - * @member {string} destinationConnectionProfileName - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.destinationConnectionProfileName = ""; - - /** - * DestinationConfig gcsDestinationConfig. - * @member {google.cloud.datastream.v1alpha1.IGcsDestinationConfig|null|undefined} gcsDestinationConfig - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.gcsDestinationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DestinationConfig destinationStreamConfig. - * @member {"gcsDestinationConfig"|undefined} destinationStreamConfig - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @instance - */ - Object.defineProperty(DestinationConfig.prototype, "destinationStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestinationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.DestinationConfig} DestinationConfig instance - */ - DestinationConfig.create = function create(properties) { - return new DestinationConfig(properties); - }; - - /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1alpha1.DestinationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IDestinationConfig} message DestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.destinationConnectionProfileName != null && Object.hasOwnProperty.call(message, "destinationConnectionProfileName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationConnectionProfileName); - if (message.gcsDestinationConfig != null && Object.hasOwnProperty.call(message, "gcsDestinationConfig")) - $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig.encode(message.gcsDestinationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.DestinationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.IDestinationConfig} message DestinationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.DestinationConfig} DestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.DestinationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.destinationConnectionProfileName = reader.string(); - break; - } - case 100: { - message.gcsDestinationConfig = $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.DestinationConfig} DestinationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DestinationConfig message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DestinationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.destinationConnectionProfileName != null && message.hasOwnProperty("destinationConnectionProfileName")) - if (!$util.isString(message.destinationConnectionProfileName)) - return "destinationConnectionProfileName: string expected"; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - properties.destinationStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig.verify(message.gcsDestinationConfig); - if (error) - return "gcsDestinationConfig." + error; - } - } - return null; - }; - - /** - * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.DestinationConfig} DestinationConfig - */ - DestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.DestinationConfig) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.DestinationConfig(); - if (object.destinationConnectionProfileName != null) - message.destinationConnectionProfileName = String(object.destinationConnectionProfileName); - if (object.gcsDestinationConfig != null) { - if (typeof object.gcsDestinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.DestinationConfig.gcsDestinationConfig: object expected"); - message.gcsDestinationConfig = $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig.fromObject(object.gcsDestinationConfig); - } - return message; - }; - - /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1alpha1.DestinationConfig} message DestinationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.destinationConnectionProfileName = ""; - if (message.destinationConnectionProfileName != null && message.hasOwnProperty("destinationConnectionProfileName")) - object.destinationConnectionProfileName = message.destinationConnectionProfileName; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - object.gcsDestinationConfig = $root.google.cloud.datastream.v1alpha1.GcsDestinationConfig.toObject(message.gcsDestinationConfig, options); - if (options.oneofs) - object.destinationStreamConfig = "gcsDestinationConfig"; - } - return object; - }; - - /** - * Converts this DestinationConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @instance - * @returns {Object.} JSON object - */ - DestinationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DestinationConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.DestinationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.DestinationConfig"; - }; - - return DestinationConfig; - })(); - - v1alpha1.Stream = (function() { - - /** - * Properties of a Stream. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IStream - * @property {string|null} [name] Stream name - * @property {google.protobuf.ITimestamp|null} [createTime] Stream createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Stream updateTime - * @property {Object.|null} [labels] Stream labels - * @property {string|null} [displayName] Stream displayName - * @property {google.cloud.datastream.v1alpha1.ISourceConfig|null} [sourceConfig] Stream sourceConfig - * @property {google.cloud.datastream.v1alpha1.IDestinationConfig|null} [destinationConfig] Stream destinationConfig - * @property {google.cloud.datastream.v1alpha1.Stream.State|null} [state] Stream state - * @property {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy|null} [backfillAll] Stream backfillAll - * @property {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy|null} [backfillNone] Stream backfillNone - * @property {Array.|null} [errors] Stream errors - */ - - /** - * Constructs a new Stream. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a Stream. - * @implements IStream - * @constructor - * @param {google.cloud.datastream.v1alpha1.IStream=} [properties] Properties to set - */ - function Stream(properties) { - this.labels = {}; - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Stream name. - * @member {string} name - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.name = ""; - - /** - * Stream createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.createTime = null; - - /** - * Stream updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.updateTime = null; - - /** - * Stream labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.labels = $util.emptyObject; - - /** - * Stream displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.displayName = ""; - - /** - * Stream sourceConfig. - * @member {google.cloud.datastream.v1alpha1.ISourceConfig|null|undefined} sourceConfig - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.sourceConfig = null; - - /** - * Stream destinationConfig. - * @member {google.cloud.datastream.v1alpha1.IDestinationConfig|null|undefined} destinationConfig - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.destinationConfig = null; - - /** - * Stream state. - * @member {google.cloud.datastream.v1alpha1.Stream.State} state - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.state = 0; - - /** - * Stream backfillAll. - * @member {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy|null|undefined} backfillAll - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.backfillAll = null; - - /** - * Stream backfillNone. - * @member {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy|null|undefined} backfillNone - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.backfillNone = null; - - /** - * Stream errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Stream.prototype.errors = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Stream backfillStrategy. - * @member {"backfillAll"|"backfillNone"|undefined} backfillStrategy - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - */ - Object.defineProperty(Stream.prototype, "backfillStrategy", { - get: $util.oneOfGetter($oneOfFields = ["backfillAll", "backfillNone"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Stream instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {google.cloud.datastream.v1alpha1.IStream=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Stream} Stream instance - */ - Stream.create = function create(properties) { - return new Stream(properties); - }; - - /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {google.cloud.datastream.v1alpha1.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.sourceConfig != null && Object.hasOwnProperty.call(message, "sourceConfig")) - $root.google.cloud.datastream.v1alpha1.SourceConfig.encode(message.sourceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.destinationConfig != null && Object.hasOwnProperty.call(message, "destinationConfig")) - $root.google.cloud.datastream.v1alpha1.DestinationConfig.encode(message.destinationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1alpha1.Error.encode(message.errors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.backfillAll != null && Object.hasOwnProperty.call(message, "backfillAll")) - $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.encode(message.backfillAll, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.backfillNone != null && Object.hasOwnProperty.call(message, "backfillNone")) - $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.encode(message.backfillNone, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {google.cloud.datastream.v1alpha1.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Stream(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.sourceConfig = $root.google.cloud.datastream.v1alpha1.SourceConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.destinationConfig = $root.google.cloud.datastream.v1alpha1.DestinationConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 101: { - message.backfillAll = $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.decode(reader, reader.uint32()); - break; - } - case 102: { - message.backfillNone = $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1alpha1.Error.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Stream message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - 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"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) { - var error = $root.google.cloud.datastream.v1alpha1.SourceConfig.verify(message.sourceConfig); - if (error) - return "sourceConfig." + error; - } - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) { - var error = $root.google.cloud.datastream.v1alpha1.DestinationConfig.verify(message.destinationConfig); - if (error) - return "destinationConfig." + 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: - case 7: - case 8: - break; - } - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.verify(message.backfillAll); - if (error) - return "backfillAll." + error; - } - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - if (properties.backfillStrategy === 1) - return "backfillStrategy: multiple values"; - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.verify(message.backfillNone); - if (error) - return "backfillNone." + error; - } - } - 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.datastream.v1alpha1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Stream} Stream - */ - Stream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Stream) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.Stream(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.sourceConfig != null) { - if (typeof object.sourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.sourceConfig: object expected"); - message.sourceConfig = $root.google.cloud.datastream.v1alpha1.SourceConfig.fromObject(object.sourceConfig); - } - if (object.destinationConfig != null) { - if (typeof object.destinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.destinationConfig: object expected"); - message.destinationConfig = $root.google.cloud.datastream.v1alpha1.DestinationConfig.fromObject(object.destinationConfig); - } - 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 "CREATED": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "MAINTENANCE": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "FAILED_PERMANENTLY": - case 6: - message.state = 6; - break; - case "STARTING": - case 7: - message.state = 7; - break; - case "DRAINING": - case 8: - message.state = 8; - break; - } - if (object.backfillAll != null) { - if (typeof object.backfillAll !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.backfillAll: object expected"); - message.backfillAll = $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.fromObject(object.backfillAll); - } - if (object.backfillNone != null) { - if (typeof object.backfillNone !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.backfillNone: object expected"); - message.backfillNone = $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.fromObject(object.backfillNone); - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1alpha1.Error.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {google.cloud.datastream.v1alpha1.Stream} message Stream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.sourceConfig = null; - object.destinationConfig = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) - object.sourceConfig = $root.google.cloud.datastream.v1alpha1.SourceConfig.toObject(message.sourceConfig, options); - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) - object.destinationConfig = $root.google.cloud.datastream.v1alpha1.DestinationConfig.toObject(message.destinationConfig, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1alpha1.Stream.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1alpha1.Stream.State[message.state] : message.state; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1alpha1.Error.toObject(message.errors[j], options); - } - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - object.backfillAll = $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.toObject(message.backfillAll, options); - if (options.oneofs) - object.backfillStrategy = "backfillAll"; - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - object.backfillNone = $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.toObject(message.backfillNone, options); - if (options.oneofs) - object.backfillStrategy = "backfillNone"; - } - return object; - }; - - /** - * Converts this Stream to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Stream - * @instance - * @returns {Object.} JSON object - */ - Stream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Stream - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Stream - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Stream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Stream"; - }; - - Stream.BackfillAllStrategy = (function() { - - /** - * Properties of a BackfillAllStrategy. - * @memberof google.cloud.datastream.v1alpha1.Stream - * @interface IBackfillAllStrategy - * @property {google.cloud.datastream.v1alpha1.IOracleRdbms|null} [oracleExcludedObjects] BackfillAllStrategy oracleExcludedObjects - * @property {google.cloud.datastream.v1alpha1.IMysqlRdbms|null} [mysqlExcludedObjects] BackfillAllStrategy mysqlExcludedObjects - */ - - /** - * Constructs a new BackfillAllStrategy. - * @memberof google.cloud.datastream.v1alpha1.Stream - * @classdesc Represents a BackfillAllStrategy. - * @implements IBackfillAllStrategy - * @constructor - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy=} [properties] Properties to set - */ - function BackfillAllStrategy(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]]; - } - - /** - * BackfillAllStrategy oracleExcludedObjects. - * @member {google.cloud.datastream.v1alpha1.IOracleRdbms|null|undefined} oracleExcludedObjects - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.oracleExcludedObjects = null; - - /** - * BackfillAllStrategy mysqlExcludedObjects. - * @member {google.cloud.datastream.v1alpha1.IMysqlRdbms|null|undefined} mysqlExcludedObjects - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.mysqlExcludedObjects = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackfillAllStrategy excludedObjects. - * @member {"oracleExcludedObjects"|"mysqlExcludedObjects"|undefined} excludedObjects - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @instance - */ - Object.defineProperty(BackfillAllStrategy.prototype, "excludedObjects", { - get: $util.oneOfGetter($oneOfFields = ["oracleExcludedObjects", "mysqlExcludedObjects"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackfillAllStrategy instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy} BackfillAllStrategy instance - */ - BackfillAllStrategy.create = function create(properties) { - return new BackfillAllStrategy(properties); - }; - - /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillAllStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oracleExcludedObjects != null && Object.hasOwnProperty.call(message, "oracleExcludedObjects")) - $root.google.cloud.datastream.v1alpha1.OracleRdbms.encode(message.oracleExcludedObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mysqlExcludedObjects != null && Object.hasOwnProperty.call(message, "mysqlExcludedObjects")) - $root.google.cloud.datastream.v1alpha1.MysqlRdbms.encode(message.mysqlExcludedObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillAllStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy} BackfillAllStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillAllStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.oracleExcludedObjects = $root.google.cloud.datastream.v1alpha1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy} BackfillAllStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillAllStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackfillAllStrategy message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackfillAllStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.OracleRdbms.verify(message.oracleExcludedObjects); - if (error) - return "oracleExcludedObjects." + error; - } - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.verify(message.mysqlExcludedObjects); - if (error) - return "mysqlExcludedObjects." + error; - } - } - return null; - }; - - /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy} BackfillAllStrategy - */ - BackfillAllStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy(); - if (object.oracleExcludedObjects != null) { - if (typeof object.oracleExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.oracleExcludedObjects: object expected"); - message.oracleExcludedObjects = $root.google.cloud.datastream.v1alpha1.OracleRdbms.fromObject(object.oracleExcludedObjects); - } - if (object.mysqlExcludedObjects != null) { - if (typeof object.mysqlExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.mysqlExcludedObjects: object expected"); - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.fromObject(object.mysqlExcludedObjects); - } - return message; - }; - - /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy} message BackfillAllStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackfillAllStrategy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - object.oracleExcludedObjects = $root.google.cloud.datastream.v1alpha1.OracleRdbms.toObject(message.oracleExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "oracleExcludedObjects"; - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - object.mysqlExcludedObjects = $root.google.cloud.datastream.v1alpha1.MysqlRdbms.toObject(message.mysqlExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "mysqlExcludedObjects"; - } - return object; - }; - - /** - * Converts this BackfillAllStrategy to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @instance - * @returns {Object.} JSON object - */ - BackfillAllStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackfillAllStrategy - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackfillAllStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy"; - }; - - return BackfillAllStrategy; - })(); - - Stream.BackfillNoneStrategy = (function() { - - /** - * Properties of a BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1alpha1.Stream - * @interface IBackfillNoneStrategy - */ - - /** - * Constructs a new BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1alpha1.Stream - * @classdesc Represents a BackfillNoneStrategy. - * @implements IBackfillNoneStrategy - * @constructor - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy=} [properties] Properties to set - */ - function BackfillNoneStrategy(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 BackfillNoneStrategy instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy} BackfillNoneStrategy instance - */ - BackfillNoneStrategy.create = function create(properties) { - return new BackfillNoneStrategy(properties); - }; - - /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillNoneStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackfillNoneStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillNoneStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackfillNoneStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackfillNoneStrategy message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackfillNoneStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy} BackfillNoneStrategy - */ - BackfillNoneStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy) - return object; - return new $root.google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy(); - }; - - /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy} message BackfillNoneStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackfillNoneStrategy.toObject = function toObject() { - return {}; - }; - - /** - * Converts this BackfillNoneStrategy to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @instance - * @returns {Object.} JSON object - */ - BackfillNoneStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackfillNoneStrategy - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackfillNoneStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy"; - }; - - return BackfillNoneStrategy; - })(); - - /** - * State enum. - * @name google.cloud.datastream.v1alpha1.Stream.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATED=1 CREATED value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} MAINTENANCE=4 MAINTENANCE value - * @property {number} FAILED=5 FAILED value - * @property {number} FAILED_PERMANENTLY=6 FAILED_PERMANENTLY value - * @property {number} STARTING=7 STARTING value - * @property {number} DRAINING=8 DRAINING value - */ - Stream.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATED"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "MAINTENANCE"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "FAILED_PERMANENTLY"] = 6; - values[valuesById[7] = "STARTING"] = 7; - values[valuesById[8] = "DRAINING"] = 8; - return values; - })(); - - return Stream; - })(); - - v1alpha1.Error = (function() { - - /** - * Properties of an Error. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IError - * @property {string|null} [reason] Error reason - * @property {string|null} [errorUuid] Error errorUuid - * @property {string|null} [message] Error message - * @property {google.protobuf.ITimestamp|null} [errorTime] Error errorTime - * @property {Object.|null} [details] Error details - */ - - /** - * Constructs a new Error. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents an Error. - * @implements IError - * @constructor - * @param {google.cloud.datastream.v1alpha1.IError=} [properties] Properties to set - */ - function Error(properties) { - this.details = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Error reason. - * @member {string} reason - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - */ - Error.prototype.reason = ""; - - /** - * Error errorUuid. - * @member {string} errorUuid - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - */ - Error.prototype.errorUuid = ""; - - /** - * Error message. - * @member {string} message - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - */ - Error.prototype.message = ""; - - /** - * Error errorTime. - * @member {google.protobuf.ITimestamp|null|undefined} errorTime - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - */ - Error.prototype.errorTime = null; - - /** - * Error details. - * @member {Object.} details - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - */ - Error.prototype.details = $util.emptyObject; - - /** - * Creates a new Error instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {google.cloud.datastream.v1alpha1.IError=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Error} Error instance - */ - Error.create = function create(properties) { - return new Error(properties); - }; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Error.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {google.cloud.datastream.v1alpha1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.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.errorUuid != null && Object.hasOwnProperty.call(message, "errorUuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorUuid); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); - if (message.errorTime != null && Object.hasOwnProperty.call(message, "errorTime")) - $root.google.protobuf.Timestamp.encode(message.errorTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - for (var keys = Object.keys(message.details), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.details[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Error.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {google.cloud.datastream.v1alpha1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Error message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Error(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.reason = reader.string(); - break; - } - case 2: { - message.errorUuid = reader.string(); - break; - } - case 3: { - message.message = reader.string(); - break; - } - case 4: { - message.errorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.details === $util.emptyObject) - message.details = {}; - 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.details[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Error message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Error.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.errorUuid != null && message.hasOwnProperty("errorUuid")) - if (!$util.isString(message.errorUuid)) - return "errorUuid: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.errorTime); - if (error) - return "errorTime." + error; - } - if (message.details != null && message.hasOwnProperty("details")) { - if (!$util.isObject(message.details)) - return "details: object expected"; - var key = Object.keys(message.details); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.details[key[i]])) - return "details: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Error} Error - */ - Error.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Error) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.Error(); - if (object.reason != null) - message.reason = String(object.reason); - if (object.errorUuid != null) - message.errorUuid = String(object.errorUuid); - if (object.message != null) - message.message = String(object.message); - if (object.errorTime != null) { - if (typeof object.errorTime !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Error.errorTime: object expected"); - message.errorTime = $root.google.protobuf.Timestamp.fromObject(object.errorTime); - } - if (object.details) { - if (typeof object.details !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Error.details: object expected"); - message.details = {}; - for (var keys = Object.keys(object.details), i = 0; i < keys.length; ++i) - message.details[keys[i]] = String(object.details[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {google.cloud.datastream.v1alpha1.Error} message Error - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Error.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.details = {}; - if (options.defaults) { - object.reason = ""; - object.errorUuid = ""; - object.message = ""; - object.errorTime = null; - } - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) - object.errorUuid = message.errorUuid; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) - object.errorTime = $root.google.protobuf.Timestamp.toObject(message.errorTime, options); - var keys2; - if (message.details && (keys2 = Object.keys(message.details)).length) { - object.details = {}; - for (var j = 0; j < keys2.length; ++j) - object.details[keys2[j]] = message.details[keys2[j]]; - } - return object; - }; - - /** - * Converts this Error to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Error - * @instance - * @returns {Object.} JSON object - */ - Error.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Error - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Error - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Error"; - }; - - return Error; - })(); - - v1alpha1.ValidationResult = (function() { - - /** - * Properties of a ValidationResult. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IValidationResult - * @property {Array.|null} [validations] ValidationResult validations - */ - - /** - * Constructs a new ValidationResult. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ValidationResult. - * @implements IValidationResult - * @constructor - * @param {google.cloud.datastream.v1alpha1.IValidationResult=} [properties] Properties to set - */ - function ValidationResult(properties) { - this.validations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidationResult validations. - * @member {Array.} validations - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @instance - */ - ValidationResult.prototype.validations = $util.emptyArray; - - /** - * Creates a new ValidationResult instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationResult=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ValidationResult} ValidationResult instance - */ - ValidationResult.create = function create(properties) { - return new ValidationResult(properties); - }; - - /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationResult} message ValidationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validations != null && message.validations.length) - for (var i = 0; i < message.validations.length; ++i) - $root.google.cloud.datastream.v1alpha1.Validation.encode(message.validations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationResult} message ValidationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidationResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ValidationResult} ValidationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ValidationResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.validations && message.validations.length)) - message.validations = []; - message.validations.push($root.google.cloud.datastream.v1alpha1.Validation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ValidationResult} ValidationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidationResult message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validations != null && message.hasOwnProperty("validations")) { - if (!Array.isArray(message.validations)) - return "validations: array expected"; - for (var i = 0; i < message.validations.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.Validation.verify(message.validations[i]); - if (error) - return "validations." + error; - } - } - return null; - }; - - /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ValidationResult} ValidationResult - */ - ValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ValidationResult) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ValidationResult(); - if (object.validations) { - if (!Array.isArray(object.validations)) - throw TypeError(".google.cloud.datastream.v1alpha1.ValidationResult.validations: array expected"); - message.validations = []; - for (var i = 0; i < object.validations.length; ++i) { - if (typeof object.validations[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ValidationResult.validations: object expected"); - message.validations[i] = $root.google.cloud.datastream.v1alpha1.Validation.fromObject(object.validations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {google.cloud.datastream.v1alpha1.ValidationResult} message ValidationResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validations = []; - if (message.validations && message.validations.length) { - object.validations = []; - for (var j = 0; j < message.validations.length; ++j) - object.validations[j] = $root.google.cloud.datastream.v1alpha1.Validation.toObject(message.validations[j], options); - } - return object; - }; - - /** - * Converts this ValidationResult to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @instance - * @returns {Object.} JSON object - */ - ValidationResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidationResult - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ValidationResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ValidationResult"; - }; - - return ValidationResult; - })(); - - v1alpha1.Validation = (function() { - - /** - * Properties of a Validation. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IValidation - * @property {string|null} [description] Validation description - * @property {google.cloud.datastream.v1alpha1.Validation.Status|null} [status] Validation status - * @property {Array.|null} [message] Validation message - * @property {string|null} [code] Validation code - */ - - /** - * Constructs a new Validation. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a Validation. - * @implements IValidation - * @constructor - * @param {google.cloud.datastream.v1alpha1.IValidation=} [properties] Properties to set - */ - function Validation(properties) { - this.message = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Validation description. - * @member {string} description - * @memberof google.cloud.datastream.v1alpha1.Validation - * @instance - */ - Validation.prototype.description = ""; - - /** - * Validation status. - * @member {google.cloud.datastream.v1alpha1.Validation.Status} status - * @memberof google.cloud.datastream.v1alpha1.Validation - * @instance - */ - Validation.prototype.status = 0; - - /** - * Validation message. - * @member {Array.} message - * @memberof google.cloud.datastream.v1alpha1.Validation - * @instance - */ - Validation.prototype.message = $util.emptyArray; - - /** - * Validation code. - * @member {string} code - * @memberof google.cloud.datastream.v1alpha1.Validation - * @instance - */ - Validation.prototype.code = ""; - - /** - * Creates a new Validation instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {google.cloud.datastream.v1alpha1.IValidation=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.Validation} Validation instance - */ - Validation.create = function create(properties) { - return new Validation(properties); - }; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1alpha1.Validation.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {google.cloud.datastream.v1alpha1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.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.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); - if (message.message != null && message.message.length) - for (var i = 0; i < message.message.length; ++i) - $root.google.cloud.datastream.v1alpha1.ValidationMessage.encode(message.message[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); - return writer; - }; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.Validation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {google.cloud.datastream.v1alpha1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.Validation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.status = reader.int32(); - break; - } - case 3: { - if (!(message.message && message.message.length)) - message.message = []; - message.message.push($root.google.cloud.datastream.v1alpha1.ValidationMessage.decode(reader, reader.uint32())); - break; - } - case 4: { - message.code = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Validation message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Validation.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.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.message != null && message.hasOwnProperty("message")) { - if (!Array.isArray(message.message)) - return "message: array expected"; - for (var i = 0; i < message.message.length; ++i) { - var error = $root.google.cloud.datastream.v1alpha1.ValidationMessage.verify(message.message[i]); - if (error) - return "message." + error; - } - } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; - return null; - }; - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.Validation} Validation - */ - Validation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.Validation) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.Validation(); - if (object.description != null) - message.description = String(object.description); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "NOT_EXECUTED": - case 1: - message.status = 1; - break; - case "FAILED": - case 2: - message.status = 2; - break; - case "PASSED": - case 3: - message.status = 3; - break; - } - if (object.message) { - if (!Array.isArray(object.message)) - throw TypeError(".google.cloud.datastream.v1alpha1.Validation.message: array expected"); - message.message = []; - for (var i = 0; i < object.message.length; ++i) { - if (typeof object.message[i] !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.Validation.message: object expected"); - message.message[i] = $root.google.cloud.datastream.v1alpha1.ValidationMessage.fromObject(object.message[i]); - } - } - if (object.code != null) - message.code = String(object.code); - return message; - }; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {google.cloud.datastream.v1alpha1.Validation} message Validation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.message = []; - if (options.defaults) { - object.description = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.cloud.datastream.v1alpha1.Validation.Status[message.status] === undefined ? message.status : $root.google.cloud.datastream.v1alpha1.Validation.Status[message.status] : message.status; - if (message.message && message.message.length) { - object.message = []; - for (var j = 0; j < message.message.length; ++j) - object.message[j] = $root.google.cloud.datastream.v1alpha1.ValidationMessage.toObject(message.message[j], options); - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - return object; - }; - - /** - * Converts this Validation to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.Validation - * @instance - * @returns {Object.} JSON object - */ - Validation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Validation - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.Validation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.Validation"; - }; - - /** - * Status enum. - * @name google.cloud.datastream.v1alpha1.Validation.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} NOT_EXECUTED=1 NOT_EXECUTED value - * @property {number} FAILED=2 FAILED value - * @property {number} PASSED=3 PASSED value - */ - Validation.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_EXECUTED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "PASSED"] = 3; - return values; - })(); - - return Validation; - })(); - - v1alpha1.ValidationMessage = (function() { - - /** - * Properties of a ValidationMessage. - * @memberof google.cloud.datastream.v1alpha1 - * @interface IValidationMessage - * @property {string|null} [message] ValidationMessage message - * @property {google.cloud.datastream.v1alpha1.ValidationMessage.Level|null} [level] ValidationMessage level - * @property {Object.|null} [metadata] ValidationMessage metadata - * @property {string|null} [code] ValidationMessage code - */ - - /** - * Constructs a new ValidationMessage. - * @memberof google.cloud.datastream.v1alpha1 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage - * @constructor - * @param {google.cloud.datastream.v1alpha1.IValidationMessage=} [properties] Properties to set - */ - function ValidationMessage(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]]; - } - - /** - * ValidationMessage message. - * @member {string} message - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.message = ""; - - /** - * ValidationMessage level. - * @member {google.cloud.datastream.v1alpha1.ValidationMessage.Level} level - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.level = 0; - - /** - * ValidationMessage metadata. - * @member {Object.} metadata - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.metadata = $util.emptyObject; - - /** - * ValidationMessage code. - * @member {string} code - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.code = ""; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.datastream.v1alpha1.ValidationMessage} ValidationMessage instance - */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); - }; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationMessage.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.level != null && Object.hasOwnProperty.call(message, "level")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); - 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(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); - return writer; - }; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1alpha1.ValidationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1alpha1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1alpha1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1alpha1.ValidationMessage(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.level = reader.int32(); - 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; - } - case 4: { - message.code = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1alpha1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidationMessage message. - * @function verify - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.level != null && message.hasOwnProperty("level")) - switch (message.level) { - default: - return "level: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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"; - } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; - return null; - }; - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1alpha1.ValidationMessage} ValidationMessage - */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1alpha1.ValidationMessage) - return object; - var message = new $root.google.cloud.datastream.v1alpha1.ValidationMessage(); - if (object.message != null) - message.message = String(object.message); - switch (object.level) { - default: - if (typeof object.level === "number") { - message.level = object.level; - break; - } - break; - case "LEVEL_UNSPECIFIED": - case 0: - message.level = 0; - break; - case "WARNING": - case 1: - message.level = 1; - break; - case "ERROR": - case 2: - message.level = 2; - break; - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.datastream.v1alpha1.ValidationMessage.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]]); - } - if (object.code != null) - message.code = String(object.code); - return message; - }; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {google.cloud.datastream.v1alpha1.ValidationMessage} message ValidationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.message = ""; - object.level = options.enums === String ? "LEVEL_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.level != null && message.hasOwnProperty("level")) - object.level = options.enums === String ? $root.google.cloud.datastream.v1alpha1.ValidationMessage.Level[message.level] === undefined ? message.level : $root.google.cloud.datastream.v1alpha1.ValidationMessage.Level[message.level] : message.level; - 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]]; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - return object; - }; - - /** - * Converts this ValidationMessage to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @instance - * @returns {Object.} JSON object - */ - ValidationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidationMessage - * @function getTypeUrl - * @memberof google.cloud.datastream.v1alpha1.ValidationMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1alpha1.ValidationMessage"; - }; - - /** - * Level enum. - * @name google.cloud.datastream.v1alpha1.ValidationMessage.Level - * @enum {number} - * @property {number} LEVEL_UNSPECIFIED=0 LEVEL_UNSPECIFIED value - * @property {number} WARNING=1 WARNING value - * @property {number} ERROR=2 ERROR value - */ - ValidationMessage.Level = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "WARNING"] = 1; - values[valuesById[2] = "ERROR"] = 2; - return values; - })(); - - return ValidationMessage; - })(); - - return v1alpha1; - })(); - - return datastream; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - } - 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) { - 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(); - 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; - } - 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; - } - } - 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; - } - } - 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 = ""; - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - 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) { - 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(); - 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 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; - } - 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); - } - 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; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, 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"; - }; - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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) { - if (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; - - /** - * 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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 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; - } - 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); - } - 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.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 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) { - 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(); - 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) { - 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(); - 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; - })(); - - /** - * 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; - })(); - - /** - * 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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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_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[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} [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.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 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); - 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) { - 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(); - 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 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.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 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.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_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 = []; - } - 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; - 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 - */ - - /** - * 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; - - /** - * 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]); - 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) { - 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(); - 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; - } - 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"; - } - 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]); - } - 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; - } - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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]); - 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) { - 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(); - 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; - } - 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"; - } - 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]); - } - 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; - } - 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]; - } - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 {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 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.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) { - 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(); - 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 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.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.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[".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.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) { - 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(); - 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 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_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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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 {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 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.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) { - 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(); - 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 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.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.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; - } - 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.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) { - 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(); - 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 - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * 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; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * 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.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).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) { - 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(); - 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; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - 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"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - 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]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - 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.longrunning.operationInfo"] = 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.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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); - 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) { - 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(); - 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; - } - 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; - } - 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; - } - 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; - } - 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; - 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; - })(); - - 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) { - 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(); - 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 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 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_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_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} [features] FeatureSetEditionDefault features - */ - - /** - * 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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = 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.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.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - 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) { - 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(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $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 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + 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_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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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) { - 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(); - 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.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @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 Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(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]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(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]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.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 GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(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]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - 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 ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(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]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.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 CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(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]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.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 DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(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]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(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]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.json deleted file mode 100644 index 4d0cec84dbf..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/protos/protos.json +++ /dev/null @@ -1,4240 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "datastream": { - "nested": { - "v1alpha1": { - "options": { - "csharp_namespace": "Google.Cloud.Datastream.V1Alpha1", - "go_package": "cloud.google.com/go/datastream/apiv1alpha1/datastreampb;datastreampb", - "java_multiple_files": true, - "java_outer_classname": "CloudDatastreamResourcesProto", - "java_package": "com.google.cloud.datastream.v1alpha1", - "php_namespace": "Google\\Cloud\\Datastream\\V1alpha1", - "ruby_package": "Google::Cloud::Datastream::V1alpha1" - }, - "nested": { - "Datastream": { - "options": { - "(google.api.default_host)": "datastream.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectionProfiles": { - "requestType": "ListConnectionProfilesRequest", - "responseType": "ListConnectionProfilesResponse", - "options": { - "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetConnectionProfile": { - "requestType": "GetConnectionProfileRequest", - "responseType": "ConnectionProfile", - "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateConnectionProfile": { - "requestType": "CreateConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles", - "(google.api.http).body": "connection_profile", - "(google.api.method_signature)": "parent,connection_profile,connection_profile_id", - "(google.longrunning.operation_info).response_type": "ConnectionProfile", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles", - "body": "connection_profile" - } - }, - { - "(google.api.method_signature)": "parent,connection_profile,connection_profile_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConnectionProfile", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectionProfile": { - "requestType": "UpdateConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1alpha1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.http).body": "connection_profile", - "(google.api.method_signature)": "connection_profile,update_mask", - "(google.longrunning.operation_info).response_type": "ConnectionProfile", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1alpha1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}", - "body": "connection_profile" - } - }, - { - "(google.api.method_signature)": "connection_profile,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConnectionProfile", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectionProfile": { - "requestType": "DeleteConnectionProfileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1alpha1/{name=projects/*/locations/*/connectionProfiles/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DiscoverConnectionProfile": { - "requestType": "DiscoverConnectionProfileRequest", - "responseType": "DiscoverConnectionProfileResponse", - "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles:discover", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{parent=projects/*/locations/*}/connectionProfiles:discover", - "body": "*" - } - } - ] - }, - "ListStreams": { - "requestType": "ListStreamsRequest", - "responseType": "ListStreamsResponse", - "options": { - "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*}/streams", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{parent=projects/*/locations/*}/streams" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetStream": { - "requestType": "GetStreamRequest", - "responseType": "Stream", - "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/streams/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{name=projects/*/locations/*/streams/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateStream": { - "requestType": "CreateStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/streams", - "(google.api.http).body": "stream", - "(google.api.method_signature)": "parent,stream,stream_id", - "(google.longrunning.operation_info).response_type": "Stream", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{parent=projects/*/locations/*}/streams", - "body": "stream" - } - }, - { - "(google.api.method_signature)": "parent,stream,stream_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Stream", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateStream": { - "requestType": "UpdateStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1alpha1/{stream.name=projects/*/locations/*/streams/*}", - "(google.api.http).body": "stream", - "(google.api.method_signature)": "stream,update_mask", - "(google.longrunning.operation_info).response_type": "Stream", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1alpha1/{stream.name=projects/*/locations/*/streams/*}", - "body": "stream" - } - }, - { - "(google.api.method_signature)": "stream,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Stream", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteStream": { - "requestType": "DeleteStreamRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/streams/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1alpha1/{name=projects/*/locations/*/streams/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FetchErrors": { - "requestType": "FetchErrorsRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha1/{stream=projects/*/locations/*/streams/*}:fetchErrors", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "FetchErrorsResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{stream=projects/*/locations/*/streams/*}:fetchErrors", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "FetchErrorsResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FetchStaticIps": { - "requestType": "FetchStaticIpsRequest", - "responseType": "FetchStaticIpsResponse", - "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*}:fetchStaticIps", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{name=projects/*/locations/*}:fetchStaticIps" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreatePrivateConnection": { - "requestType": "CreatePrivateConnectionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/privateConnections", - "(google.api.http).body": "private_connection", - "(google.api.method_signature)": "parent,private_connection,private_connection_id", - "(google.longrunning.operation_info).response_type": "PrivateConnection", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{parent=projects/*/locations/*}/privateConnections", - "body": "private_connection" - } - }, - { - "(google.api.method_signature)": "parent,private_connection,private_connection_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "PrivateConnection", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetPrivateConnection": { - "requestType": "GetPrivateConnectionRequest", - "responseType": "PrivateConnection", - "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListPrivateConnections": { - "requestType": "ListPrivateConnectionsRequest", - "responseType": "ListPrivateConnectionsResponse", - "options": { - "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*}/privateConnections", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{parent=projects/*/locations/*}/privateConnections" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeletePrivateConnection": { - "requestType": "DeletePrivateConnectionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateRoute": { - "requestType": "CreateRouteRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "(google.api.http).body": "route", - "(google.api.method_signature)": "parent,route,route_id", - "(google.longrunning.operation_info).response_type": "Route", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "body": "route" - } - }, - { - "(google.api.method_signature)": "parent,route,route_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Route", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetRoute": { - "requestType": "GetRouteRequest", - "responseType": "Route", - "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListRoutes": { - "requestType": "ListRoutesRequest", - "responseType": "ListRoutesResponse", - "options": { - "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha1/{parent=projects/*/locations/*/privateConnections/*}/routes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteRoute": { - "requestType": "DeleteRouteRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1alpha1/{name=projects/*/locations/*/privateConnections/*/routes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "DiscoverConnectionProfileRequest": { - "oneofs": { - "target": { - "oneof": [ - "connectionProfile", - "connectionProfileName" - ] - }, - "depth": { - "oneof": [ - "recursive", - "recursionDepth" - ] - }, - "dataObject": { - "oneof": [ - "oracleRdbms", - "mysqlRdbms" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 200 - }, - "connectionProfileName": { - "type": "string", - "id": 201 - }, - "recursive": { - "type": "bool", - "id": 3 - }, - "recursionDepth": { - "type": "int32", - "id": 4 - }, - "oracleRdbms": { - "type": "OracleRdbms", - "id": 100 - }, - "mysqlRdbms": { - "type": "MysqlRdbms", - "id": 101 - } - } - }, - "DiscoverConnectionProfileResponse": { - "oneofs": { - "dataObject": { - "oneof": [ - "oracleRdbms", - "mysqlRdbms" - ] - } - }, - "fields": { - "oracleRdbms": { - "type": "OracleRdbms", - "id": 100 - }, - "mysqlRdbms": { - "type": "MysqlRdbms", - "id": 101 - } - } - }, - "FetchStaticIpsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "FetchStaticIpsResponse": { - "fields": { - "staticIps": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "FetchErrorsRequest": { - "fields": { - "stream": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - } - } - }, - "FetchErrorsResponse": { - "fields": { - "errors": { - "rule": "repeated", - "type": "Error", - "id": 1 - } - } - }, - "ListConnectionProfilesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectionProfilesResponse": { - "fields": { - "connectionProfiles": { - "rule": "repeated", - "type": "ConnectionProfile", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectionProfileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - } - } - }, - "CreateConnectionProfileRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "connectionProfileId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateConnectionProfileRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteConnectionProfileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/ConnectionProfile" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListStreamsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Stream" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListStreamsResponse": { - "fields": { - "streams": { - "rule": "repeated", - "type": "Stream", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetStreamRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - } - } - }, - "CreateStreamRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Stream" - } - }, - "streamId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "stream": { - "type": "Stream", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateStreamRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stream": { - "type": "Stream", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteStreamRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "validationResult": { - "type": "ValidationResult", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreatePrivateConnectionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/PrivateConnection" - } - }, - "privateConnectionId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "privateConnection": { - "type": "PrivateConnection", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPrivateConnectionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/PrivateConnection" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListPrivateConnectionsResponse": { - "fields": { - "privateConnections": { - "rule": "repeated", - "type": "PrivateConnection", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeletePrivateConnectionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/PrivateConnection" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetPrivateConnectionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/PrivateConnection" - } - } - } - }, - "CreateRouteRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Route" - } - }, - "routeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "route": { - "type": "Route", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListRoutesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datastream.googleapis.com/Route" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListRoutesResponse": { - "fields": { - "routes": { - "rule": "repeated", - "type": "Route", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeleteRouteRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Route" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetRouteRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datastream.googleapis.com/Route" - } - } - } - }, - "OracleProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "databaseService": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "connectionAttributes": { - "keyType": "string", - "type": "string", - "id": 6 - } - } - }, - "MysqlProfile": { - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 2 - }, - "username": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "sslConfig": { - "type": "MysqlSslConfig", - "id": 5 - } - } - }, - "GcsProfile": { - "fields": { - "bucketName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "rootPath": { - "type": "string", - "id": 2 - } - } - }, - "NoConnectivitySettings": { - "fields": {} - }, - "StaticServiceIpConnectivity": { - "fields": {} - }, - "ForwardSshTunnelConnectivity": { - "oneofs": { - "authenticationMethod": { - "oneof": [ - "password", - "privateKey" - ] - } - }, - "fields": { - "hostname": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "username": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "port": { - "type": "int32", - "id": 3 - }, - "password": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "privateKey": { - "type": "string", - "id": 101, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - } - } - }, - "VpcPeeringConfig": { - "fields": { - "vpcName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "subnet": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PrivateConnection": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/PrivateConnection", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/privateConnections/{private_connection}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "error": { - "type": "Error", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "vpcPeeringConfig": { - "type": "VpcPeeringConfig", - "id": 100 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "CREATED": 2, - "FAILED": 3 - } - } - } - }, - "PrivateConnectivity": { - "fields": { - "privateConnectionName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Route": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/Route", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationAddress": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationPort": { - "type": "int32", - "id": 7 - } - } - }, - "MysqlSslConfig": { - "fields": { - "clientKey": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "clientKeySet": { - "type": "bool", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientCertificate": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "clientCertificateSet": { - "type": "bool", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "caCertificate": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "caCertificateSet": { - "type": "bool", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ConnectionProfile": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/ConnectionProfile", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" - }, - "oneofs": { - "profile": { - "oneof": [ - "oracleProfile", - "gcsProfile", - "mysqlProfile" - ] - }, - "connectivity": { - "oneof": [ - "noConnectivity", - "staticServiceIpConnectivity", - "forwardSshConnectivity", - "privateConnectivity" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "oracleProfile": { - "type": "OracleProfile", - "id": 100 - }, - "gcsProfile": { - "type": "GcsProfile", - "id": 101 - }, - "mysqlProfile": { - "type": "MysqlProfile", - "id": 102 - }, - "noConnectivity": { - "type": "NoConnectivitySettings", - "id": 200 - }, - "staticServiceIpConnectivity": { - "type": "StaticServiceIpConnectivity", - "id": 201 - }, - "forwardSshConnectivity": { - "type": "ForwardSshTunnelConnectivity", - "id": 202 - }, - "privateConnectivity": { - "type": "PrivateConnectivity", - "id": 203 - } - } - }, - "OracleColumn": { - "fields": { - "columnName": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "precision": { - "type": "int32", - "id": 4 - }, - "scale": { - "type": "int32", - "id": 5 - }, - "encoding": { - "type": "string", - "id": 6 - }, - "primaryKey": { - "type": "bool", - "id": 7 - }, - "nullable": { - "type": "bool", - "id": 8 - }, - "ordinalPosition": { - "type": "int32", - "id": 9 - } - } - }, - "OracleTable": { - "fields": { - "tableName": { - "type": "string", - "id": 1 - }, - "oracleColumns": { - "rule": "repeated", - "type": "OracleColumn", - "id": 2 - } - } - }, - "OracleSchema": { - "fields": { - "schemaName": { - "type": "string", - "id": 1 - }, - "oracleTables": { - "rule": "repeated", - "type": "OracleTable", - "id": 2 - } - } - }, - "OracleRdbms": { - "fields": { - "oracleSchemas": { - "rule": "repeated", - "type": "OracleSchema", - "id": 1 - } - } - }, - "OracleSourceConfig": { - "fields": { - "allowlist": { - "type": "OracleRdbms", - "id": 1 - }, - "rejectlist": { - "type": "OracleRdbms", - "id": 2 - } - } - }, - "MysqlColumn": { - "fields": { - "columnName": { - "type": "string", - "id": 1 - }, - "dataType": { - "type": "string", - "id": 2 - }, - "length": { - "type": "int32", - "id": 3 - }, - "collation": { - "type": "string", - "id": 4 - }, - "primaryKey": { - "type": "bool", - "id": 5 - }, - "nullable": { - "type": "bool", - "id": 6 - }, - "ordinalPosition": { - "type": "int32", - "id": 7 - } - } - }, - "MysqlTable": { - "fields": { - "tableName": { - "type": "string", - "id": 1 - }, - "mysqlColumns": { - "rule": "repeated", - "type": "MysqlColumn", - "id": 2 - } - } - }, - "MysqlDatabase": { - "fields": { - "databaseName": { - "type": "string", - "id": 1 - }, - "mysqlTables": { - "rule": "repeated", - "type": "MysqlTable", - "id": 2 - } - } - }, - "MysqlRdbms": { - "fields": { - "mysqlDatabases": { - "rule": "repeated", - "type": "MysqlDatabase", - "id": 1 - } - } - }, - "MysqlSourceConfig": { - "fields": { - "allowlist": { - "type": "MysqlRdbms", - "id": 1 - }, - "rejectlist": { - "type": "MysqlRdbms", - "id": 2 - } - } - }, - "SourceConfig": { - "oneofs": { - "sourceStreamConfig": { - "oneof": [ - "oracleSourceConfig", - "mysqlSourceConfig" - ] - } - }, - "fields": { - "sourceConnectionProfileName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "oracleSourceConfig": { - "type": "OracleSourceConfig", - "id": 100 - }, - "mysqlSourceConfig": { - "type": "MysqlSourceConfig", - "id": 101 - } - } - }, - "AvroFileFormat": { - "fields": {} - }, - "GcsFileFormat": { - "options": { - "deprecated": true - }, - "values": { - "GCS_FILE_FORMAT_UNSPECIFIED": 0, - "AVRO": 1 - } - }, - "SchemaFileFormat": { - "values": { - "SCHEMA_FILE_FORMAT_UNSPECIFIED": 0, - "NO_SCHEMA_FILE": 1, - "AVRO_SCHEMA_FILE": 2 - } - }, - "JsonFileFormat": { - "fields": { - "schemaFileFormat": { - "type": "SchemaFileFormat", - "id": 1 - }, - "compression": { - "type": "JsonCompression", - "id": 2 - } - }, - "nested": { - "JsonCompression": { - "values": { - "JSON_COMPRESSION_UNSPECIFIED": 0, - "NO_COMPRESSION": 1, - "GZIP": 2 - } - } - } - }, - "GcsDestinationConfig": { - "oneofs": { - "fileFormat": { - "oneof": [ - "avroFileFormat", - "jsonFileFormat" - ] - } - }, - "fields": { - "path": { - "type": "string", - "id": 1 - }, - "gcsFileFormat": { - "type": "GcsFileFormat", - "id": 2, - "options": { - "deprecated": true - } - }, - "fileRotationMb": { - "type": "int32", - "id": 3 - }, - "fileRotationInterval": { - "type": "google.protobuf.Duration", - "id": 4 - }, - "avroFileFormat": { - "type": "AvroFileFormat", - "id": 100 - }, - "jsonFileFormat": { - "type": "JsonFileFormat", - "id": 101 - } - } - }, - "DestinationConfig": { - "oneofs": { - "destinationStreamConfig": { - "oneof": [ - "gcsDestinationConfig" - ] - } - }, - "fields": { - "destinationConnectionProfileName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "gcsDestinationConfig": { - "type": "GcsDestinationConfig", - "id": 100 - } - } - }, - "Stream": { - "options": { - "(google.api.resource).type": "datastream.googleapis.com/Stream", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/streams/{stream}" - }, - "oneofs": { - "backfillStrategy": { - "oneof": [ - "backfillAll", - "backfillNone" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sourceConfig": { - "type": "SourceConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destinationConfig": { - "type": "DestinationConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 8 - }, - "backfillAll": { - "type": "BackfillAllStrategy", - "id": 101 - }, - "backfillNone": { - "type": "BackfillNoneStrategy", - "id": 102 - }, - "errors": { - "rule": "repeated", - "type": "Error", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "BackfillAllStrategy": { - "oneofs": { - "excludedObjects": { - "oneof": [ - "oracleExcludedObjects", - "mysqlExcludedObjects" - ] - } - }, - "fields": { - "oracleExcludedObjects": { - "type": "OracleRdbms", - "id": 1 - }, - "mysqlExcludedObjects": { - "type": "MysqlRdbms", - "id": 2 - } - } - }, - "BackfillNoneStrategy": { - "fields": {} - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATED": 1, - "RUNNING": 2, - "PAUSED": 3, - "MAINTENANCE": 4, - "FAILED": 5, - "FAILED_PERMANENTLY": 6, - "STARTING": 7, - "DRAINING": 8 - } - } - } - }, - "Error": { - "fields": { - "reason": { - "type": "string", - "id": 1 - }, - "errorUuid": { - "type": "string", - "id": 2 - }, - "message": { - "type": "string", - "id": 3 - }, - "errorTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "details": { - "keyType": "string", - "type": "string", - "id": 5 - } - } - }, - "ValidationResult": { - "fields": { - "validations": { - "rule": "repeated", - "type": "Validation", - "id": 1 - } - } - }, - "Validation": { - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "status": { - "type": "Status", - "id": 2 - }, - "message": { - "rule": "repeated", - "type": "ValidationMessage", - "id": 3 - }, - "code": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "NOT_EXECUTED": 1, - "FAILED": 2, - "PASSED": 3 - } - } - } - }, - "ValidationMessage": { - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "level": { - "type": "Level", - "id": 2 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "code": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Level": { - "values": { - "LEVEL_UNSPECIFIED": 0, - "WARNING": 1, - "ERROR": 2 - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "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 - } - } - }, - "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 - } - } - }, - "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 - } - } - }, - "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 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "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 - } - } - } - } - }, - "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": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "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": { - "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, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "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": { - "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 - } - }, - "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": { - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "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 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "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": { - "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 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "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": { - "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 - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "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 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "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": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "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": { - "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": { - "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": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 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 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "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 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "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 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_connection_profile.js deleted file mode 100644 index a68fa873892..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_connection_profile.js +++ /dev/null @@ -1,86 +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 -// -// 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, connectionProfileId, connectionProfile) { - // [START datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_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 parent that owns the collection of ConnectionProfiles. - */ - // const parent = 'abc123' - /** - * Required. The connection profile identifier. - */ - // const connectionProfileId = 'abc123' - /** - * Required. The connection profile resource to create. - */ - // const connectionProfile = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateConnectionProfile() { - // Construct request - const request = { - parent, - connectionProfileId, - connectionProfile, - }; - - // Run request - const [operation] = await datastreamClient.createConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectionProfile(); - // [END datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_private_connection.js deleted file mode 100644 index 5e078c2f18b..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_private_connection.js +++ /dev/null @@ -1,86 +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 -// -// 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, privateConnectionId, privateConnection) { - // [START datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_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 parent that owns the collection of PrivateConnections. - */ - // const parent = 'abc123' - /** - * Required. The private connectivity identifier. - */ - // const privateConnectionId = 'abc123' - /** - * Required. The Private Connectivity resource to create. - */ - // const privateConnection = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreatePrivateConnection() { - // Construct request - const request = { - parent, - privateConnectionId, - privateConnection, - }; - - // Run request - const [operation] = await datastreamClient.createPrivateConnection(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreatePrivateConnection(); - // [END datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_route.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_route.js deleted file mode 100644 index 08e6cd73068..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_route.js +++ /dev/null @@ -1,86 +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 -// -// 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, routeId, route) { - // [START datastream_v1alpha1_generated_Datastream_CreateRoute_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 parent that owns the collection of Routes. - */ - // const parent = 'abc123' - /** - * Required. The Route identifier. - */ - // const routeId = 'abc123' - /** - * Required. The Route resource to create. - */ - // const route = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateRoute() { - // Construct request - const request = { - parent, - routeId, - route, - }; - - // Run request - const [operation] = await datastreamClient.createRoute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRoute(); - // [END datastream_v1alpha1_generated_Datastream_CreateRoute_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_stream.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_stream.js deleted file mode 100644 index fdad72398c2..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.create_stream.js +++ /dev/null @@ -1,95 +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 -// -// 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, streamId, stream) { - // [START datastream_v1alpha1_generated_Datastream_CreateStream_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 parent that owns the collection of streams. - */ - // const parent = 'abc123' - /** - * Required. The stream identifier. - */ - // const streamId = 'abc123' - /** - * Required. The stream resource to create. - */ - // const stream = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the stream, but do not create any resources. - * The default is false. - */ - // const validateOnly = true - /** - * Optional. Create the stream without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callCreateStream() { - // Construct request - const request = { - parent, - streamId, - stream, - }; - - // Run request - const [operation] = await datastreamClient.createStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateStream(); - // [END datastream_v1alpha1_generated_Datastream_CreateStream_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_connection_profile.js deleted file mode 100644 index 26df6767586..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_connection_profile.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_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 connection profile resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteConnectionProfile() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectionProfile(); - // [END datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_private_connection.js deleted file mode 100644 index ca3192391d1..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_private_connection.js +++ /dev/null @@ -1,81 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_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 private connectivity configuration to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, any child routes that belong to this PrivateConnection will - * also be deleted. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeletePrivateConnection() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deletePrivateConnection(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePrivateConnection(); - // [END datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_route.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_route.js deleted file mode 100644 index a64fd34ceef..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_route.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_DeleteRoute_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 Route resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteRoute() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteRoute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteRoute(); - // [END datastream_v1alpha1_generated_Datastream_DeleteRoute_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_stream.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_stream.js deleted file mode 100644 index 8cdf6cd06d2..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.delete_stream.js +++ /dev/null @@ -1,76 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_DeleteStream_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 stream resource to delete. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDeleteStream() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await datastreamClient.deleteStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteStream(); - // [END datastream_v1alpha1_generated_Datastream_DeleteStream_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.discover_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.discover_connection_profile.js deleted file mode 100644 index 1f73bc6e353..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.discover_connection_profile.js +++ /dev/null @@ -1,87 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_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 parent resource of the ConnectionProfile type. Must be in the - * format `projects/* /locations/*`. - */ - // const parent = 'abc123' - /** - * An ad-hoc ConnectionProfile configuration. - */ - // const connectionProfile = {} - /** - * A reference to an existing ConnectionProfile. - */ - // const connectionProfileName = 'abc123' - /** - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - */ - // const recursive = true - /** - * The number of hierarchy levels below the current level to be retrieved. - */ - // const recursionDepth = 1234 - /** - * Oracle RDBMS to enrich with child data objects and metadata. - */ - // const oracleRdbms = {} - /** - * MySQL RDBMS to enrich with child data objects and metadata. - */ - // const mysqlRdbms = {} - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callDiscoverConnectionProfile() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datastreamClient.discoverConnectionProfile(request); - console.log(response); - } - - callDiscoverConnectionProfile(); - // [END datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_errors.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_errors.js deleted file mode 100644 index 68843db2085..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_errors.js +++ /dev/null @@ -1,61 +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 -// -// 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() { - // [START datastream_v1alpha1_generated_Datastream_FetchErrors_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. - */ - /** - * Name of the Stream resource for which to fetch any errors. - */ - // const stream = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callFetchErrors() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await datastreamClient.fetchErrors(request); - const [response] = await operation.promise(); - console.log(response); - } - - callFetchErrors(); - // [END datastream_v1alpha1_generated_Datastream_FetchErrors_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_static_ips.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_static_ips.js deleted file mode 100644 index 73c112e1b81..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.fetch_static_ips.js +++ /dev/null @@ -1,73 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_FetchStaticIps_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 resource of the Response type. Must be in the - * format `projects/* /locations/*`. - */ - // const name = 'abc123' - /** - * Maximum number of Ips to return, will likely not be specified. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - */ - // const pageToken = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callFetchStaticIps() { - // Construct request - const request = { - name, - }; - - // Run request - const iterable = datastreamClient.fetchStaticIpsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callFetchStaticIps(); - // [END datastream_v1alpha1_generated_Datastream_FetchStaticIps_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_connection_profile.js deleted file mode 100644 index c2002d97640..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_connection_profile.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_GetConnectionProfile_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 connection profile resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetConnectionProfile() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getConnectionProfile(request); - console.log(response); - } - - callGetConnectionProfile(); - // [END datastream_v1alpha1_generated_Datastream_GetConnectionProfile_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_private_connection.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_private_connection.js deleted file mode 100644 index 0f750d8137d..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_private_connection.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_GetPrivateConnection_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 private connectivity configuration to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetPrivateConnection() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getPrivateConnection(request); - console.log(response); - } - - callGetPrivateConnection(); - // [END datastream_v1alpha1_generated_Datastream_GetPrivateConnection_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_route.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_route.js deleted file mode 100644 index d8aa854f262..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_route.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_GetRoute_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 Route resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetRoute() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getRoute(request); - console.log(response); - } - - callGetRoute(); - // [END datastream_v1alpha1_generated_Datastream_GetRoute_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_stream.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_stream.js deleted file mode 100644 index 78efaf31833..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.get_stream.js +++ /dev/null @@ -1,61 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_GetStream_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 stream resource to get. - */ - // const name = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callGetStream() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datastreamClient.getStream(request); - console.log(response); - } - - callGetStream(); - // [END datastream_v1alpha1_generated_Datastream_GetStream_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_connection_profiles.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_connection_profiles.js deleted file mode 100644 index bf6426b307a..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_connection_profiles.js +++ /dev/null @@ -1,84 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_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 parent that owns the collection of connection profiles. - */ - // const parent = 'abc123' - /** - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListConnectionProfiles() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listConnectionProfilesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectionProfiles(); - // [END datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_private_connections.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_private_connections.js deleted file mode 100644 index ebeef686436..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_private_connections.js +++ /dev/null @@ -1,86 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_ListPrivateConnections_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 parent that owns the collection of private connectivity configurations. - */ - // const parent = 'abc123' - /** - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListPrivateConnections() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listPrivateConnectionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPrivateConnections(); - // [END datastream_v1alpha1_generated_Datastream_ListPrivateConnections_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_routes.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_routes.js deleted file mode 100644 index 2727ff243f3..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_routes.js +++ /dev/null @@ -1,86 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_ListRoutes_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 parent that owns the collection of Routess. - */ - // const parent = 'abc123' - /** - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListRoutes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listRoutesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRoutes(); - // [END datastream_v1alpha1_generated_Datastream_ListRoutes_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_streams.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_streams.js deleted file mode 100644 index b98cfb8daa7..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.list_streams.js +++ /dev/null @@ -1,84 +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 -// -// 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 datastream_v1alpha1_generated_Datastream_ListStreams_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 parent that owns the collection of streams. - */ - // const parent = 'abc123' - /** - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Filter request. - */ - // const filter = 'abc123' - /** - * Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callListStreams() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = datastreamClient.listStreamsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStreams(); - // [END datastream_v1alpha1_generated_Datastream_ListStreams_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_connection_profile.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_connection_profile.js deleted file mode 100644 index f8602a2a323..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_connection_profile.js +++ /dev/null @@ -1,84 +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 -// -// 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(connectionProfile) { - // [START datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_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. - */ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The ConnectionProfile to update. - */ - // const connectionProfile = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callUpdateConnectionProfile() { - // Construct request - const request = { - connectionProfile, - }; - - // Run request - const [operation] = await datastreamClient.updateConnectionProfile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectionProfile(); - // [END datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_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-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_stream.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_stream.js deleted file mode 100644 index 229914f4a43..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/datastream.update_stream.js +++ /dev/null @@ -1,93 +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 -// -// 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(stream) { - // [START datastream_v1alpha1_generated_Datastream_UpdateStream_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. - */ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The stream resource to update. - */ - // const stream = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. Only validate the stream with the changes, without actually updating it. - * The default is false. - */ - // const validateOnly = true - /** - * Optional. Execute the update without validating it. - */ - // const force = true - - // Imports the Datastream library - const {DatastreamClient} = require('@google-cloud/datastream').v1alpha1; - - // Instantiates a client - const datastreamClient = new DatastreamClient(); - - async function callUpdateStream() { - // Construct request - const request = { - stream, - }; - - // Run request - const [operation] = await datastreamClient.updateStream(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateStream(); - // [END datastream_v1alpha1_generated_Datastream_UpdateStream_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-datastream/v1alpha1/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json deleted file mode 100644 index 60024d25853..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datastream", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.datastream.v1alpha1", - "version": "v1alpha1" - } - ] - }, - "snippets": [ - { - "regionTag": "datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_async", - "title": "Datastream listConnectionProfiles Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list connection profiles created in a project and location.", - "canonical": true, - "file": "datastream.list_connection_profiles.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectionProfiles", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "ListConnectionProfiles", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfiles", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_GetConnectionProfile_async", - "title": "Datastream getConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a connection profile.", - "canonical": true, - "file": "datastream.get_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.ConnectionProfile", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "GetConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async", - "title": "Datastream createConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a connection profile in a project and location.", - "canonical": true, - "file": "datastream.create_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1alpha1.ConnectionProfile" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "CreateConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async", - "title": "Datastream updateConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to update the parameters of a connection profile.", - "canonical": true, - "file": "datastream.update_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfile", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1alpha1.ConnectionProfile" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "UpdateConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async", - "title": "Datastream deleteConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a connection profile..", - "canonical": true, - "file": "datastream.delete_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "DeleteConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_async", - "title": "Datastream discoverConnectionProfile Sample", - "origin": "API_DEFINITION", - "description": " Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.", - "canonical": true, - "file": "datastream.discover_connection_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DiscoverConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "connection_profile", - "type": ".google.cloud.datastream.v1alpha1.ConnectionProfile" - }, - { - "name": "connection_profile_name", - "type": "TYPE_STRING" - }, - { - "name": "recursive", - "type": "TYPE_BOOL" - }, - { - "name": "recursion_depth", - "type": "TYPE_INT32" - }, - { - "name": "oracle_rdbms", - "type": ".google.cloud.datastream.v1alpha1.OracleRdbms" - }, - { - "name": "mysql_rdbms", - "type": ".google.cloud.datastream.v1alpha1.MysqlRdbms" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "DiscoverConnectionProfile", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfile", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_ListStreams_async", - "title": "Datastream listStreams Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list streams in a project and location.", - "canonical": true, - "file": "datastream.list_streams.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStreams", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListStreams", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.ListStreamsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "ListStreams", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListStreams", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_GetStream_async", - "title": "Datastream getStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a stream.", - "canonical": true, - "file": "datastream.get_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetStream", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.Stream", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "GetStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_CreateStream_async", - "title": "Datastream createStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a stream.", - "canonical": true, - "file": "datastream.create_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateStream", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "stream_id", - "type": "TYPE_STRING" - }, - { - "name": "stream", - "type": ".google.cloud.datastream.v1alpha1.Stream" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "CreateStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateStream_async", - "title": "Datastream updateStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to update the configuration of a stream.", - "canonical": true, - "file": "datastream.update_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.UpdateStream", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "stream", - "type": ".google.cloud.datastream.v1alpha1.Stream" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "UpdateStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.UpdateStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteStream_async", - "title": "Datastream deleteStream Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a stream.", - "canonical": true, - "file": "datastream.delete_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteStream", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "DeleteStream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteStream", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_FetchErrors_async", - "title": "Datastream fetchErrors Sample", - "origin": "API_DEFINITION", - "description": " Use this method to fetch any errors associated with a stream.", - "canonical": true, - "file": "datastream.fetch_errors.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchErrors", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.FetchErrors", - "async": true, - "parameters": [ - { - "name": "stream", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "FetchErrors", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.FetchErrors", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_FetchStaticIps_async", - "title": "Datastream fetchStaticIps Sample", - "origin": "API_DEFINITION", - "description": " The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.", - "canonical": true, - "file": "datastream.fetch_static_ips.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchStaticIps", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.FetchStaticIps", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.FetchStaticIpsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "FetchStaticIps", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.FetchStaticIps", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async", - "title": "Datastream createPrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a private connectivity configuration.", - "canonical": true, - "file": "datastream.create_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnection", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "private_connection_id", - "type": "TYPE_STRING" - }, - { - "name": "private_connection", - "type": ".google.cloud.datastream.v1alpha1.PrivateConnection" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "CreatePrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_GetPrivateConnection_async", - "title": "Datastream getPrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a private connectivity configuration.", - "canonical": true, - "file": "datastream.get_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnection", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.PrivateConnection", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "GetPrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_ListPrivateConnections_async", - "title": "Datastream listPrivateConnections Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list private connectivity configurations in a project and location.", - "canonical": true, - "file": "datastream.list_private_connections.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPrivateConnections", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnections", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "ListPrivateConnections", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnections", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async", - "title": "Datastream deletePrivateConnection Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a private connectivity configuration.", - "canonical": true, - "file": "datastream.delete_private_connection.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnection", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "DeletePrivateConnection", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnection", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_CreateRoute_async", - "title": "Datastream createRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to create a route for a private connectivity in a project and location.", - "canonical": true, - "file": "datastream.create_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateRoute", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "route_id", - "type": "TYPE_STRING" - }, - { - "name": "route", - "type": ".google.cloud.datastream.v1alpha1.Route" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "CreateRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.CreateRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_GetRoute_async", - "title": "Datastream getRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to get details about a route.", - "canonical": true, - "file": "datastream.get_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetRoute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.Route", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "GetRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.GetRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_ListRoutes_async", - "title": "Datastream listRoutes Sample", - "origin": "API_DEFINITION", - "description": " Use this method to list routes created for a private connectivity in a project and location.", - "canonical": true, - "file": "datastream.list_routes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRoutes", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListRoutes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datastream.v1alpha1.ListRoutesResponse", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "ListRoutes", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.ListRoutes", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - }, - { - "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteRoute_async", - "title": "Datastream deleteRoute Sample", - "origin": "API_DEFINITION", - "description": " Use this method to delete a route.", - "canonical": true, - "file": "datastream.delete_route.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteRoute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DatastreamClient", - "fullName": "google.cloud.datastream.v1alpha1.DatastreamClient" - }, - "method": { - "shortName": "DeleteRoute", - "fullName": "google.cloud.datastream.v1alpha1.Datastream.DeleteRoute", - "service": { - "shortName": "Datastream", - "fullName": "google.cloud.datastream.v1alpha1.Datastream" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/index.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/index.ts deleted file mode 100644 index 2946aee0d6d..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/index.ts +++ /dev/null @@ -1,25 +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 -// -// 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 v1alpha1 from './v1alpha1'; -const DatastreamClient = v1alpha1.DatastreamClient; -type DatastreamClient = v1alpha1.DatastreamClient; -export {v1alpha1, DatastreamClient}; -export default {v1alpha1, DatastreamClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client.ts deleted file mode 100644 index e625e9ff653..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client.ts +++ /dev/null @@ -1,3276 +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 -// -// 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, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1alpha1/datastream_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './datastream_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Datastream service - * @class - * @memberof v1alpha1 - */ -export class DatastreamClient { - 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; - 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}; - operationsClient: gax.OperationsClient; - datastreamStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DatastreamClient. - * - * @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://developers.google.com/identity/protocols/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 DatastreamClient({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 DatastreamClient; - 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 = 'datastream.' + 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); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // 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 = { - connectionProfilePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/connectionProfiles/{connection_profile}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - privateConnectionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/privateConnections/{private_connection}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - routePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}' - ), - streamPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/streams/{stream}' - ), - }; - - // 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 = { - listConnectionProfiles: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connectionProfiles'), - listStreams: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'streams'), - fetchStaticIps: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'staticIps'), - listPrivateConnections: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'privateConnections'), - listRoutes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'routes') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1alpha1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1alpha1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1alpha1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1alpha1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1alpha1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectionProfileResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.ConnectionProfile') as gax.protobuf.Type; - const createConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const updateConnectionProfileResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.ConnectionProfile') as gax.protobuf.Type; - const updateConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectionProfileResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectionProfileMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const createStreamResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.Stream') as gax.protobuf.Type; - const createStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const updateStreamResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.Stream') as gax.protobuf.Type; - const updateStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const deleteStreamResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteStreamMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const fetchErrorsResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.FetchErrorsResponse') as gax.protobuf.Type; - const fetchErrorsMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const createPrivateConnectionResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.PrivateConnection') as gax.protobuf.Type; - const createPrivateConnectionMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const deletePrivateConnectionResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deletePrivateConnectionMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const createRouteResponse = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.Route') as gax.protobuf.Type; - const createRouteMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - const deleteRouteResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteRouteMetadata = protoFilesRoot.lookup( - '.google.cloud.datastream.v1alpha1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectionProfileResponse.decode.bind(createConnectionProfileResponse), - createConnectionProfileMetadata.decode.bind(createConnectionProfileMetadata)), - updateConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectionProfileResponse.decode.bind(updateConnectionProfileResponse), - updateConnectionProfileMetadata.decode.bind(updateConnectionProfileMetadata)), - deleteConnectionProfile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectionProfileResponse.decode.bind(deleteConnectionProfileResponse), - deleteConnectionProfileMetadata.decode.bind(deleteConnectionProfileMetadata)), - createStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createStreamResponse.decode.bind(createStreamResponse), - createStreamMetadata.decode.bind(createStreamMetadata)), - updateStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateStreamResponse.decode.bind(updateStreamResponse), - updateStreamMetadata.decode.bind(updateStreamMetadata)), - deleteStream: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteStreamResponse.decode.bind(deleteStreamResponse), - deleteStreamMetadata.decode.bind(deleteStreamMetadata)), - fetchErrors: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - fetchErrorsResponse.decode.bind(fetchErrorsResponse), - fetchErrorsMetadata.decode.bind(fetchErrorsMetadata)), - createPrivateConnection: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createPrivateConnectionResponse.decode.bind(createPrivateConnectionResponse), - createPrivateConnectionMetadata.decode.bind(createPrivateConnectionMetadata)), - deletePrivateConnection: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deletePrivateConnectionResponse.decode.bind(deletePrivateConnectionResponse), - deletePrivateConnectionMetadata.decode.bind(deletePrivateConnectionMetadata)), - createRoute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createRouteResponse.decode.bind(createRouteResponse), - createRouteMetadata.decode.bind(createRouteMetadata)), - deleteRoute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteRouteResponse.decode.bind(deleteRouteResponse), - deleteRouteMetadata.decode.bind(deleteRouteMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datastream.v1alpha1.Datastream', 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.datastreamStub) { - return this.datastreamStub; - } - - // Put together the "service stub" for - // google.cloud.datastream.v1alpha1.Datastream. - this.datastreamStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.datastream.v1alpha1.Datastream') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datastream.v1alpha1.Datastream, - 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 datastreamStubMethods = - ['listConnectionProfiles', 'getConnectionProfile', 'createConnectionProfile', 'updateConnectionProfile', 'deleteConnectionProfile', 'discoverConnectionProfile', 'listStreams', 'getStream', 'createStream', 'updateStream', 'deleteStream', 'fetchErrors', 'fetchStaticIps', 'createPrivateConnection', 'getPrivateConnection', 'listPrivateConnections', 'deletePrivateConnection', 'createRoute', 'getRoute', 'listRoutes', 'deleteRoute']; - for (const methodName of datastreamStubMethods) { - const callPromise = this.datastreamStub.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] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.datastreamStub; - } - - /** - * 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 'datastream.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 'datastream.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 -- - // ------------------- -/** - * Use this method to get details about a connection profile. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the connection profile resource to get. - * @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.datastream.v1alpha1.ConnectionProfile|ConnectionProfile}. - * 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/v1alpha1/datastream.get_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_GetConnectionProfile_async - */ - getConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|undefined, {}|undefined - ]>; - getConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - getConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - getConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IConnectionProfile, - protos.google.cloud.datastream.v1alpha1.IGetConnectionProfileRequest|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(); - return this.innerApiCalls.getConnectionProfile(request, options, callback); - } -/** - * Use this method to discover a connection profile. - * The discover API call exposes the data objects and metadata belonging to - * the profile. Typically, a request returns children data objects under a - * parent data object that's optionally supplied in the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the ConnectionProfile type. Must be in the - * format `projects/* /locations/*`. - * @param {google.cloud.datastream.v1alpha1.ConnectionProfile} request.connectionProfile - * An ad-hoc ConnectionProfile configuration. - * @param {string} request.connectionProfileName - * A reference to an existing ConnectionProfile. - * @param {boolean} request.recursive - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - * @param {number} request.recursionDepth - * The number of hierarchy levels below the current level to be retrieved. - * @param {google.cloud.datastream.v1alpha1.OracleRdbms} request.oracleRdbms - * Oracle RDBMS to enrich with child data objects and metadata. - * @param {google.cloud.datastream.v1alpha1.MysqlRdbms} request.mysqlRdbms - * MySQL RDBMS to enrich with child data objects and metadata. - * @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.datastream.v1alpha1.DiscoverConnectionProfileResponse|DiscoverConnectionProfileResponse}. - * 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/v1alpha1/datastream.discover_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_async - */ - discoverConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|undefined, {}|undefined - ]>; - discoverConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - discoverConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): void; - discoverConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse, - protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileRequest|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(); - return this.innerApiCalls.discoverConnectionProfile(request, options, callback); - } -/** - * Use this method to get details about a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the stream resource to get. - * @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.datastream.v1alpha1.Stream|Stream}. - * 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/v1alpha1/datastream.get_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_GetStream_async - */ - getStream( - request?: protos.google.cloud.datastream.v1alpha1.IGetStreamRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|undefined, {}|undefined - ]>; - getStream( - request: protos.google.cloud.datastream.v1alpha1.IGetStreamRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|null|undefined, - {}|null|undefined>): void; - getStream( - request: protos.google.cloud.datastream.v1alpha1.IGetStreamRequest, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|null|undefined, - {}|null|undefined>): void; - getStream( - request?: protos.google.cloud.datastream.v1alpha1.IGetStreamRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IStream, - protos.google.cloud.datastream.v1alpha1.IGetStreamRequest|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(); - return this.innerApiCalls.getStream(request, options, callback); - } -/** - * Use this method to get details about a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the private connectivity configuration to get. - * @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.datastream.v1alpha1.PrivateConnection|PrivateConnection}. - * 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/v1alpha1/datastream.get_private_connection.js - * region_tag:datastream_v1alpha1_generated_Datastream_GetPrivateConnection_async - */ - getPrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|undefined, {}|undefined - ]>; - getPrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): void; - getPrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): void; - getPrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IPrivateConnection, - protos.google.cloud.datastream.v1alpha1.IGetPrivateConnectionRequest|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(); - return this.innerApiCalls.getPrivateConnection(request, options, callback); - } -/** - * Use this method to get details about a route. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Route resource to get. - * @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.datastream.v1alpha1.Route|Route}. - * 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/v1alpha1/datastream.get_route.js - * region_tag:datastream_v1alpha1_generated_Datastream_GetRoute_async - */ - getRoute( - request?: protos.google.cloud.datastream.v1alpha1.IGetRouteRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|undefined, {}|undefined - ]>; - getRoute( - request: protos.google.cloud.datastream.v1alpha1.IGetRouteRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|null|undefined, - {}|null|undefined>): void; - getRoute( - request: protos.google.cloud.datastream.v1alpha1.IGetRouteRequest, - callback: Callback< - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|null|undefined, - {}|null|undefined>): void; - getRoute( - request?: protos.google.cloud.datastream.v1alpha1.IGetRouteRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IRoute, - protos.google.cloud.datastream.v1alpha1.IGetRouteRequest|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(); - return this.innerApiCalls.getRoute(request, options, callback); - } - -/** - * Use this method to create a connection profile in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of ConnectionProfiles. - * @param {string} request.connectionProfileId - * Required. The connection profile identifier. - * @param {google.cloud.datastream.v1alpha1.ConnectionProfile} request.connectionProfile - * Required. The connection profile resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async - */ - createConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.ICreateConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async - */ - async checkCreateConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to update the parameters of a connection profile. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.datastream.v1alpha1.ConnectionProfile} request.connectionProfile - * Required. The ConnectionProfile to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.update_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async - */ - updateConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IUpdateConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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({ - 'connection_profile.name': request.connectionProfile!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.update_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async - */ - async checkUpdateConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a connection profile.. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the connection profile resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async - */ - deleteConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectionProfile( - request: protos.google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectionProfile( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteConnectionProfileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteConnectionProfile(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectionProfile()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_connection_profile.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async - */ - async checkDeleteConnectionProfileProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {string} request.streamId - * Required. The stream identifier. - * @param {google.cloud.datastream.v1alpha1.Stream} request.stream - * Required. The stream resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the stream, but do not create any resources. - * The default is false. - * @param {boolean} [request.force] - * Optional. Create the stream without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateStream_async - */ - createStream( - request?: protos.google.cloud.datastream.v1alpha1.ICreateStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createStream( - request: protos.google.cloud.datastream.v1alpha1.ICreateStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStream( - request: protos.google.cloud.datastream.v1alpha1.ICreateStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStream( - request?: protos.google.cloud.datastream.v1alpha1.ICreateStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateStream_async - */ - async checkCreateStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to update the configuration of a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.datastream.v1alpha1.Stream} request.stream - * Required. The stream resource to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. Only validate the stream with the changes, without actually updating it. - * The default is false. - * @param {boolean} [request.force] - * Optional. Execute the update without validating it. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.update_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_UpdateStream_async - */ - updateStream( - request?: protos.google.cloud.datastream.v1alpha1.IUpdateStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateStream( - request: protos.google.cloud.datastream.v1alpha1.IUpdateStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStream( - request: protos.google.cloud.datastream.v1alpha1.IUpdateStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStream( - request?: protos.google.cloud.datastream.v1alpha1.IUpdateStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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({ - 'stream.name': request.stream!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.update_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_UpdateStream_async - */ - async checkUpdateStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the stream resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteStream_async - */ - deleteStream( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteStreamRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteStream( - request: protos.google.cloud.datastream.v1alpha1.IDeleteStreamRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStream( - request: protos.google.cloud.datastream.v1alpha1.IDeleteStreamRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStream( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteStreamRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteStream(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteStream()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_stream.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteStream_async - */ - async checkDeleteStreamProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteStream, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to fetch any errors associated with a stream. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.stream - * Name of the Stream resource for which to fetch any errors. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.fetch_errors.js - * region_tag:datastream_v1alpha1_generated_Datastream_FetchErrors_async - */ - fetchErrors( - request?: protos.google.cloud.datastream.v1alpha1.IFetchErrorsRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - fetchErrors( - request: protos.google.cloud.datastream.v1alpha1.IFetchErrorsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - fetchErrors( - request: protos.google.cloud.datastream.v1alpha1.IFetchErrorsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - fetchErrors( - request?: protos.google.cloud.datastream.v1alpha1.IFetchErrorsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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({ - 'stream': request.stream ?? '', - }); - this.initialize(); - return this.innerApiCalls.fetchErrors(request, options, callback); - } -/** - * Check the status of the long running operation returned by `fetchErrors()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.fetch_errors.js - * region_tag:datastream_v1alpha1_generated_Datastream_FetchErrors_async - */ - async checkFetchErrorsProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.fetchErrors, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of PrivateConnections. - * @param {string} request.privateConnectionId - * Required. The private connectivity identifier. - * @param {google.cloud.datastream.v1alpha1.PrivateConnection} request.privateConnection - * Required. The Private Connectivity resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_private_connection.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async - */ - createPrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createPrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.ICreatePrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createPrivateConnection(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createPrivateConnection()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_private_connection.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async - */ - async checkCreatePrivateConnectionProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createPrivateConnection, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a private connectivity configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the private connectivity configuration to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.force] - * Optional. If set to true, any child routes that belong to this PrivateConnection will - * also be deleted. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_private_connection.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async - */ - deletePrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deletePrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePrivateConnection( - request: protos.google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePrivateConnection( - request?: protos.google.cloud.datastream.v1alpha1.IDeletePrivateConnectionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deletePrivateConnection(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deletePrivateConnection()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_private_connection.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async - */ - async checkDeletePrivateConnectionProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePrivateConnection, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to create a route for a private connectivity in a project - * and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routes. - * @param {string} request.routeId - * Required. The Route identifier. - * @param {google.cloud.datastream.v1alpha1.Route} request.route - * Required. The Route resource to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_route.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateRoute_async - */ - createRoute( - request?: protos.google.cloud.datastream.v1alpha1.ICreateRouteRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRoute( - request: protos.google.cloud.datastream.v1alpha1.ICreateRouteRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRoute( - request: protos.google.cloud.datastream.v1alpha1.ICreateRouteRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRoute( - request?: protos.google.cloud.datastream.v1alpha1.ICreateRouteRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.createRoute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createRoute()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.create_route.js - * region_tag:datastream_v1alpha1_generated_Datastream_CreateRoute_async - */ - async checkCreateRouteProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRoute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Use this method to delete a route. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Route resource to delete. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_route.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteRoute_async - */ - deleteRoute( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteRouteRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteRoute( - request: protos.google.cloud.datastream.v1alpha1.IDeleteRouteRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRoute( - request: protos.google.cloud.datastream.v1alpha1.IDeleteRouteRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRoute( - request?: protos.google.cloud.datastream.v1alpha1.IDeleteRouteRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|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(); - return this.innerApiCalls.deleteRoute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteRoute()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha1/datastream.delete_route.js - * region_tag:datastream_v1alpha1_generated_Datastream_DeleteRoute_async - */ - async checkDeleteRouteProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRoute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Use this method to list connection profiles created in a project and - * location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.ConnectionProfile|ConnectionProfile}. - * 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 `listConnectionProfilesAsync()` - * 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. - */ - listConnectionProfiles( - request?: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IConnectionProfile[], - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest|null, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse - ]>; - listConnectionProfiles( - request: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IConnectionProfile>): void; - listConnectionProfiles( - request: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IConnectionProfile>): void; - listConnectionProfiles( - request?: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IConnectionProfile>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IConnectionProfile>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IConnectionProfile[], - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest|null, - protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesResponse - ]>|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(); - return this.innerApiCalls.listConnectionProfiles(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.ConnectionProfile|ConnectionProfile} 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 `listConnectionProfilesAsync()` - * 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. - */ - listConnectionProfilesStream( - request?: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - 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['listConnectionProfiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectionProfiles.createStream( - this.innerApiCalls.listConnectionProfiles as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectionProfiles`, 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 parent that owns the collection of connection profiles. - * @param {number} request.pageSize - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.ConnectionProfile|ConnectionProfile}. 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/v1alpha1/datastream.list_connection_profiles.js - * region_tag:datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_async - */ - listConnectionProfilesAsync( - request?: protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, - 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['listConnectionProfiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectionProfiles.asyncIterate( - this.innerApiCalls['listConnectionProfiles'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list streams in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Stream|Stream}. - * 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 `listStreamsAsync()` - * 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. - */ - listStreams( - request?: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IStream[], - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest|null, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse - ]>; - listStreams( - request: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IStream>): void; - listStreams( - request: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IStream>): void; - listStreams( - request?: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IStream>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IStream>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IStream[], - protos.google.cloud.datastream.v1alpha1.IListStreamsRequest|null, - protos.google.cloud.datastream.v1alpha1.IListStreamsResponse - ]>|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(); - return this.innerApiCalls.listStreams(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Stream|Stream} 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 `listStreamsAsync()` - * 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. - */ - listStreamsStream( - request?: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - 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['listStreams']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreams.createStream( - this.innerApiCalls.listStreams as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listStreams`, 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 parent that owns the collection of streams. - * @param {number} request.pageSize - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Stream|Stream}. 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/v1alpha1/datastream.list_streams.js - * region_tag:datastream_v1alpha1_generated_Datastream_ListStreams_async - */ - listStreamsAsync( - request?: protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, - 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['listStreams']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listStreams.asyncIterate( - this.innerApiCalls['listStreams'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * The FetchStaticIps API call exposes the static ips used by Datastream. - * Typically, a request returns children data objects under - * a parent data object that's optionally supplied in the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name resource of the Response type. Must be in the - * format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 string. - * 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 `fetchStaticIpsAsync()` - * 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. - */ - fetchStaticIps( - request?: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - options?: CallOptions): - Promise<[ - string[], - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest|null, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse - ]>; - fetchStaticIps( - request: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse|null|undefined, - string>): void; - fetchStaticIps( - request: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse|null|undefined, - string>): void; - fetchStaticIps( - request?: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse|null|undefined, - string>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse|null|undefined, - string>): - Promise<[ - string[], - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest|null, - protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsResponse - ]>|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(); - return this.innerApiCalls.fetchStaticIps(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name resource of the Response type. Must be in the - * format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 string 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 `fetchStaticIpsAsync()` - * 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. - */ - fetchStaticIpsStream( - request?: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['fetchStaticIps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchStaticIps.createStream( - this.innerApiCalls.fetchStaticIps as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `fetchStaticIps`, 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.name - * Required. The name resource of the Response type. Must be in the - * format `projects/* /locations/*`. - * @param {number} request.pageSize - * Maximum number of Ips to return, will likely not be specified. - * @param {string} request.pageToken - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * @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 - * string. 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/v1alpha1/datastream.fetch_static_ips.js - * region_tag:datastream_v1alpha1_generated_Datastream_FetchStaticIps_async - */ - fetchStaticIpsAsync( - request?: protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['fetchStaticIps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchStaticIps.asyncIterate( - this.innerApiCalls['fetchStaticIps'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list private connectivity configurations in a project - * and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.PrivateConnection|PrivateConnection}. - * 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 `listPrivateConnectionsAsync()` - * 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. - */ - listPrivateConnections( - request?: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IPrivateConnection[], - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest|null, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse - ]>; - listPrivateConnections( - request: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IPrivateConnection>): void; - listPrivateConnections( - request: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IPrivateConnection>): void; - listPrivateConnections( - request?: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IPrivateConnection>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IPrivateConnection>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IPrivateConnection[], - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest|null, - protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsResponse - ]>|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(); - return this.innerApiCalls.listPrivateConnections(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.PrivateConnection|PrivateConnection} 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 `listPrivateConnectionsAsync()` - * 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. - */ - listPrivateConnectionsStream( - request?: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - 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['listPrivateConnections']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPrivateConnections.createStream( - this.innerApiCalls.listPrivateConnections as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPrivateConnections`, 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 parent that owns the collection of private connectivity configurations. - * @param {number} request.pageSize - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.PrivateConnection|PrivateConnection}. 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/v1alpha1/datastream.list_private_connections.js - * region_tag:datastream_v1alpha1_generated_Datastream_ListPrivateConnections_async - */ - listPrivateConnectionsAsync( - request?: protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, - 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['listPrivateConnections']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPrivateConnections.asyncIterate( - this.innerApiCalls['listPrivateConnections'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Use this method to list routes created for a private connectivity in a - * project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Route|Route}. - * 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 `listRoutesAsync()` - * 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. - */ - listRoutes( - request?: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IRoute[], - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest|null, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse - ]>; - listRoutes( - request: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IRoute>): void; - listRoutes( - request: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - callback: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IRoute>): void; - listRoutes( - request?: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IRoute>, - callback?: PaginationCallback< - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse|null|undefined, - protos.google.cloud.datastream.v1alpha1.IRoute>): - Promise<[ - protos.google.cloud.datastream.v1alpha1.IRoute[], - protos.google.cloud.datastream.v1alpha1.IListRoutesRequest|null, - protos.google.cloud.datastream.v1alpha1.IListRoutesResponse - ]>|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(); - return this.innerApiCalls.listRoutes(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Route|Route} 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 `listRoutesAsync()` - * 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. - */ - listRoutesStream( - request?: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - 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['listRoutes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRoutes.createStream( - this.innerApiCalls.listRoutes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRoutes`, 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 parent that owns the collection of Routess. - * @param {number} request.pageSize - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} request.pageToken - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @param {string} request.filter - * Filter request. - * @param {string} request.orderBy - * Order by fields for the result. - * @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.datastream.v1alpha1.Route|Route}. 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/v1alpha1/datastream.list_routes.js - * region_tag:datastream_v1alpha1_generated_Datastream_ListRoutes_async - */ - listRoutesAsync( - request?: protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, - 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['listRoutes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRoutes.asyncIterate( - this.innerApiCalls['listRoutes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified connectionProfile resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} connection_profile - * @returns {string} Resource name string. - */ - connectionProfilePath(project:string,location:string,connectionProfile:string) { - return this.pathTemplates.connectionProfilePathTemplate.render({ - project: project, - location: location, - connection_profile: connectionProfile, - }); - } - - /** - * Parse the project from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).project; - } - - /** - * Parse the location from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the location. - */ - matchLocationFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).location; - } - - /** - * Parse the connection_profile from ConnectionProfile resource. - * - * @param {string} connectionProfileName - * A fully-qualified path representing ConnectionProfile resource. - * @returns {string} A string representing the connection_profile. - */ - matchConnectionProfileFromConnectionProfileName(connectionProfileName: string) { - return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).connection_profile; - } - - /** - * 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 privateConnection resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} private_connection - * @returns {string} Resource name string. - */ - privateConnectionPath(project:string,location:string,privateConnection:string) { - return this.pathTemplates.privateConnectionPathTemplate.render({ - project: project, - location: location, - private_connection: privateConnection, - }); - } - - /** - * Parse the project from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).project; - } - - /** - * Parse the location from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).location; - } - - /** - * Parse the private_connection from PrivateConnection resource. - * - * @param {string} privateConnectionName - * A fully-qualified path representing PrivateConnection resource. - * @returns {string} A string representing the private_connection. - */ - matchPrivateConnectionFromPrivateConnectionName(privateConnectionName: string) { - return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).private_connection; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified route resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} private_connection - * @param {string} route - * @returns {string} Resource name string. - */ - routePath(project:string,location:string,privateConnection:string,route:string) { - return this.pathTemplates.routePathTemplate.render({ - project: project, - location: location, - private_connection: privateConnection, - route: route, - }); - } - - /** - * Parse the project from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).project; - } - - /** - * Parse the location from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).location; - } - - /** - * Parse the private_connection from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the private_connection. - */ - matchPrivateConnectionFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).private_connection; - } - - /** - * Parse the route from Route resource. - * - * @param {string} routeName - * A fully-qualified path representing Route resource. - * @returns {string} A string representing the route. - */ - matchRouteFromRouteName(routeName: string) { - return this.pathTemplates.routePathTemplate.match(routeName).route; - } - - /** - * Return a fully-qualified stream resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} stream - * @returns {string} Resource name string. - */ - streamPath(project:string,location:string,stream:string) { - return this.pathTemplates.streamPathTemplate.render({ - project: project, - location: location, - stream: stream, - }); - } - - /** - * Parse the project from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the project. - */ - matchProjectFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).project; - } - - /** - * Parse the location from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the location. - */ - matchLocationFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).location; - } - - /** - * Parse the stream from Stream resource. - * - * @param {string} streamName - * A fully-qualified path representing Stream resource. - * @returns {string} A string representing the stream. - */ - matchStreamFromStreamName(streamName: string) { - return this.pathTemplates.streamPathTemplate.match(streamName).stream; - } - - /** - * 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.datastreamStub && !this._terminated) { - return this.datastreamStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client_config.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client_config.json deleted file mode 100644 index 0eeb5ffdfe9..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_client_config.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "interfaces": { - "google.cloud.datastream.v1alpha1.Datastream": { - "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": { - "ListConnectionProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DiscoverConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListStreams": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetStream": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteStream": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchErrors": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchStaticIps": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreatePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListPrivateConnections": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeletePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateRoute": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetRoute": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteRoute": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_proto_list.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_proto_list.json deleted file mode 100644 index baaa8482b91..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/datastream_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/cloud/datastream/v1alpha1/datastream.proto", - "../../protos/google/cloud/datastream/v1alpha1/datastream_resources.proto" -] diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/gapic_metadata.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/gapic_metadata.json deleted file mode 100644 index 57db1ad343f..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/gapic_metadata.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.datastream.v1alpha1", - "libraryPackage": "@google-cloud/datastream", - "services": { - "Datastream": { - "clients": { - "grpc": { - "libraryClient": "DatastreamClient", - "rpcs": { - "GetConnectionProfile": { - "methods": [ - "getConnectionProfile" - ] - }, - "DiscoverConnectionProfile": { - "methods": [ - "discoverConnectionProfile" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "CreateConnectionProfile": { - "methods": [ - "createConnectionProfile" - ] - }, - "UpdateConnectionProfile": { - "methods": [ - "updateConnectionProfile" - ] - }, - "DeleteConnectionProfile": { - "methods": [ - "deleteConnectionProfile" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "FetchErrors": { - "methods": [ - "fetchErrors" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "CreateRoute": { - "methods": [ - "createRoute" - ] - }, - "DeleteRoute": { - "methods": [ - "deleteRoute" - ] - }, - "ListConnectionProfiles": { - "methods": [ - "listConnectionProfiles", - "listConnectionProfilesStream", - "listConnectionProfilesAsync" - ] - }, - "ListStreams": { - "methods": [ - "listStreams", - "listStreamsStream", - "listStreamsAsync" - ] - }, - "FetchStaticIps": { - "methods": [ - "fetchStaticIps", - "fetchStaticIpsStream", - "fetchStaticIpsAsync" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections", - "listPrivateConnectionsStream", - "listPrivateConnectionsAsync" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes", - "listRoutesStream", - "listRoutesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DatastreamClient", - "rpcs": { - "GetConnectionProfile": { - "methods": [ - "getConnectionProfile" - ] - }, - "DiscoverConnectionProfile": { - "methods": [ - "discoverConnectionProfile" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "CreateConnectionProfile": { - "methods": [ - "createConnectionProfile" - ] - }, - "UpdateConnectionProfile": { - "methods": [ - "updateConnectionProfile" - ] - }, - "DeleteConnectionProfile": { - "methods": [ - "deleteConnectionProfile" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "FetchErrors": { - "methods": [ - "fetchErrors" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "CreateRoute": { - "methods": [ - "createRoute" - ] - }, - "DeleteRoute": { - "methods": [ - "deleteRoute" - ] - }, - "ListConnectionProfiles": { - "methods": [ - "listConnectionProfiles", - "listConnectionProfilesStream", - "listConnectionProfilesAsync" - ] - }, - "ListStreams": { - "methods": [ - "listStreams", - "listStreamsStream", - "listStreamsAsync" - ] - }, - "FetchStaticIps": { - "methods": [ - "fetchStaticIps", - "fetchStaticIpsStream", - "fetchStaticIpsAsync" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections", - "listPrivateConnectionsStream", - "listPrivateConnectionsAsync" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes", - "listRoutesStream", - "listRoutesAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/index.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/index.ts deleted file mode 100644 index 46c2221abd2..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/src/v1alpha1/index.ts +++ /dev/null @@ -1,19 +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 -// -// 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 {DatastreamClient} from './datastream_client'; diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 10cbd8ef19c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +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 -// -// 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 datastream = require('@google-cloud/datastream'); - -function main() { - const datastreamClient = new datastream.DatastreamClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 903b18b06d6..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +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 -// -// 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 {DatastreamClient} from '@google-cloud/datastream'; - -// check that the client class type name can be used -function doStuffWithDatastreamClient(client: DatastreamClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const datastreamClient = new DatastreamClient(); - doStuffWithDatastreamClient(datastreamClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/install.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/install.ts deleted file mode 100644 index 2a505d6df0c..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/system-test/install.ts +++ /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 -// -// 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', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/test/gapic_datastream_v1alpha1.ts b/owl-bot-staging/google-cloud-datastream/v1alpha1/test/gapic_datastream_v1alpha1.ts deleted file mode 100644 index 5d22220ddb2..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/test/gapic_datastream_v1alpha1.ts +++ /dev/null @@ -1,3991 +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 -// -// 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 datastreamModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -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('v1alpha1.DatastreamClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datastream.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient(); - 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 = datastreamModule.v1alpha1.DatastreamClient.servicePath; - assert.strictEqual(servicePath, 'datastream.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datastreamModule.v1alpha1.DatastreamClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datastream.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1alpha1.DatastreamClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1alpha1.DatastreamClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datastream.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 datastreamModule.v1alpha1.DatastreamClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = datastreamModule.v1alpha1.DatastreamClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.datastreamStub, undefined); - await client.initialize(); - assert(client.datastreamStub); - }); - - it('has close method for the initialized client', done => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.datastreamStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.datastreamStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - 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 datastreamModule.v1alpha1.DatastreamClient({ - 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('getConnectionProfile', () => { - it('invokes getConnectionProfile without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ConnectionProfile() - ); - client.innerApiCalls.getConnectionProfile = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectionProfile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ConnectionProfile() - ); - client.innerApiCalls.getConnectionProfile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectionProfile( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IConnectionProfile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectionProfile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectionProfile with closed client', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectionProfile(request), expectedError); - }); - }); - - describe('discoverConnectionProfile', () => { - it('invokes discoverConnectionProfile without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse() - ); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCall(expectedResponse); - const [response] = await client.discoverConnectionProfile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse() - ); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.discoverConnectionProfile( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IDiscoverConnectionProfileResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.discoverConnectionProfile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.discoverConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.discoverConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes discoverConnectionProfile with closed client', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.discoverConnectionProfile(request), expectedError); - }); - }); - - describe('getStream', () => { - it('invokes getStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.Stream() - ); - client.innerApiCalls.getStream = stubSimpleCall(expectedResponse); - const [response] = await client.getStream(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.Stream() - ); - client.innerApiCalls.getStream = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getStream( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IStream|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getStream = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getStream(request), expectedError); - const actualRequest = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStream with closed client', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetStreamRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getStream(request), expectedError); - }); - }); - - describe('getPrivateConnection', () => { - it('invokes getPrivateConnection without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.PrivateConnection() - ); - client.innerApiCalls.getPrivateConnection = stubSimpleCall(expectedResponse); - const [response] = await client.getPrivateConnection(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.PrivateConnection() - ); - client.innerApiCalls.getPrivateConnection = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPrivateConnection( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IPrivateConnection|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPrivateConnection = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPrivateConnection with closed client', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPrivateConnection(request), expectedError); - }); - }); - - describe('getRoute', () => { - it('invokes getRoute without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.Route() - ); - client.innerApiCalls.getRoute = stubSimpleCall(expectedResponse); - const [response] = await client.getRoute(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.Route() - ); - client.innerApiCalls.getRoute = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRoute( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IRoute|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRoute = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRoute with closed client', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.GetRouteRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getRoute(request), expectedError); - }); - }); - - describe('createConnectionProfile', () => { - it('invokes createConnectionProfile without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectionProfile', () => { - it('invokes updateConnectionProfile without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() - ); - request.connectionProfile ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest', ['connectionProfile', 'name']); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectionProfile', () => { - it('invokes deleteConnectionProfile without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectionProfile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectionProfile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectionProfile(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectionProfile with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectionProfile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectionProfile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectionProfileProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteConnectionProfileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectionProfileProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteConnectionProfileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createStream', () => { - it('invokes createStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.createStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createStream(request), expectedError); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStream with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateStreamRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateStreamProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateStreamProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateStream', () => { - it('invokes updateStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateStream(request), expectedError); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStream with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() - ); - request.stream ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.UpdateStreamRequest', ['stream', 'name']); - request.stream.name = defaultValue1; - const expectedHeaderRequestParams = `stream.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateStreamProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateStreamProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteStream', () => { - it('invokes deleteStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStream = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteStream(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStream = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteStream( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStream = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteStream(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStream with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteStreamRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStream = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteStream(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStream as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteStreamProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteStreamProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteStreamProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteStreamProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('fetchErrors', () => { - it('invokes fetchErrors without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchErrorsRequest', ['stream']); - request.stream = defaultValue1; - const expectedHeaderRequestParams = `stream=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.fetchErrors = stubLongRunningCall(expectedResponse); - const [operation] = await client.fetchErrors(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchErrors without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchErrorsRequest', ['stream']); - request.stream = defaultValue1; - const expectedHeaderRequestParams = `stream=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.fetchErrors = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchErrors( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchErrors with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchErrorsRequest', ['stream']); - request.stream = defaultValue1; - const expectedHeaderRequestParams = `stream=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchErrors = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.fetchErrors(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchErrors with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchErrorsRequest', ['stream']); - request.stream = defaultValue1; - const expectedHeaderRequestParams = `stream=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchErrors = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.fetchErrors(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchErrors as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkFetchErrorsProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkFetchErrorsProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkFetchErrorsProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkFetchErrorsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createPrivateConnection', () => { - it('invokes createPrivateConnection without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(expectedResponse); - const [operation] = await client.createPrivateConnection(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPrivateConnection = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPrivateConnection( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createPrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPrivateConnection with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPrivateConnection = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createPrivateConnection(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreatePrivateConnectionProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreatePrivateConnectionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreatePrivateConnectionProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreatePrivateConnectionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deletePrivateConnection', () => { - it('invokes deletePrivateConnection without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(expectedResponse); - const [operation] = await client.deletePrivateConnection(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePrivateConnection( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deletePrivateConnection(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePrivateConnection with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePrivateConnection = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deletePrivateConnection(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePrivateConnection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeletePrivateConnectionProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeletePrivateConnectionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeletePrivateConnectionProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeletePrivateConnectionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRoute', () => { - it('invokes createRoute without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRoute = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRoute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRoute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRoute( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRoute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRoute with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.CreateRouteRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRoute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRoute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateRouteProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateRouteProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateRouteProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateRouteProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteRoute', () => { - it('invokes deleteRoute without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRoute = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteRoute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRoute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteRoute( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute with call error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRoute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteRoute(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRoute with LRO error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.DeleteRouteRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRoute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteRoute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRoute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteRouteProgress without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteRouteProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteRouteProgress with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteRouteProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectionProfiles', () => { - it('invokes listConnectionProfiles without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - ]; - client.innerApiCalls.listConnectionProfiles = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectionProfiles(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfiles without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - ]; - client.innerApiCalls.listConnectionProfiles = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectionProfiles( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IConnectionProfile[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfiles with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectionProfiles = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectionProfiles(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectionProfiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectionProfilesStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - ]; - client.descriptors.page.listConnectionProfiles.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectionProfilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.ConnectionProfile[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.ConnectionProfile) => { - 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.listConnectionProfiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectionProfiles, request)); - assert( - (client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectionProfilesStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectionProfilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.ConnectionProfile[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.ConnectionProfile) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectionProfiles, request)); - assert( - (client.descriptors.page.listConnectionProfiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectionProfiles without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.ConnectionProfile()), - ]; - client.descriptors.page.listConnectionProfiles.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1alpha1.IConnectionProfile[] = []; - const iterable = client.listConnectionProfilesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectionProfiles with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectionProfilesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1alpha1.IConnectionProfile[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectionProfiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listStreams', () => { - it('invokes listStreams without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - ]; - client.innerApiCalls.listStreams = stubSimpleCall(expectedResponse); - const [response] = await client.listStreams(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreams without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - ]; - client.innerApiCalls.listStreams = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listStreams( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IStream[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreams with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listStreams = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listStreams(request), expectedError); - const actualRequest = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStreams as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStreamsStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - ]; - client.descriptors.page.listStreams.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listStreamsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.Stream[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.Stream) => { - 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.listStreams.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreams, request)); - assert( - (client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listStreamsStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreams.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listStreamsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.Stream[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.Stream) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStreams, request)); - assert( - (client.descriptors.page.listStreams.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreams without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Stream()), - ]; - client.descriptors.page.listStreams.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1alpha1.IStream[] = []; - const iterable = client.listStreamsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStreams with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListStreamsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listStreams.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listStreamsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1alpha1.IStream[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStreams.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('fetchStaticIps', () => { - it('invokes fetchStaticIps without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [new String(), new String(), new String()]; - client.innerApiCalls.fetchStaticIps = stubSimpleCall(expectedResponse); - const [response] = await client.fetchStaticIps(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIps without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [new String(), new String(), new String()]; - client.innerApiCalls.fetchStaticIps = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchStaticIps( - request, - (err?: Error|null, result?: string[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIps with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchStaticIps = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchStaticIps(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchStaticIps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchStaticIpsStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.fetchStaticIps.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.fetchStaticIpsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: string[] = []; - stream.on('data', (response: string) => { - 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.fetchStaticIps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchStaticIps, request)); - assert( - (client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes fetchStaticIpsStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchStaticIps.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.fetchStaticIpsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: string[] = []; - stream.on('data', (response: string) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchStaticIps, request)); - assert( - (client.descriptors.page.fetchStaticIps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchStaticIps without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.fetchStaticIps.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: string[] = []; - const iterable = client.fetchStaticIpsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchStaticIps with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchStaticIps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.fetchStaticIpsAsync(request); - await assert.rejects(async () => { - const responses: string[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPrivateConnections', () => { - it('invokes listPrivateConnections without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - ]; - client.innerApiCalls.listPrivateConnections = stubSimpleCall(expectedResponse); - const [response] = await client.listPrivateConnections(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnections without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - ]; - client.innerApiCalls.listPrivateConnections = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPrivateConnections( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IPrivateConnection[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnections with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPrivateConnections = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPrivateConnections(request), expectedError); - const actualRequest = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPrivateConnections as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPrivateConnectionsStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - ]; - client.descriptors.page.listPrivateConnections.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPrivateConnectionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.PrivateConnection[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.PrivateConnection) => { - 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.listPrivateConnections.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPrivateConnections, request)); - assert( - (client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPrivateConnectionsStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPrivateConnections.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPrivateConnectionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.PrivateConnection[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.PrivateConnection) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPrivateConnections, request)); - assert( - (client.descriptors.page.listPrivateConnections.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPrivateConnections without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.PrivateConnection()), - ]; - client.descriptors.page.listPrivateConnections.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1alpha1.IPrivateConnection[] = []; - const iterable = client.listPrivateConnectionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPrivateConnections with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPrivateConnections.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPrivateConnectionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1alpha1.IPrivateConnection[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPrivateConnections.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRoutes', () => { - it('invokes listRoutes without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - ]; - client.innerApiCalls.listRoutes = stubSimpleCall(expectedResponse); - const [response] = await client.listRoutes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutes without error using callback', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - ]; - client.innerApiCalls.listRoutes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRoutes( - request, - (err?: Error|null, result?: protos.google.cloud.datastream.v1alpha1.IRoute[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutes with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRoutes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRoutes(request), expectedError); - const actualRequest = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRoutes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRoutesStream without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - ]; - client.descriptors.page.listRoutes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRoutesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.Route[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.Route) => { - 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.listRoutes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRoutes, request)); - assert( - (client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRoutesStream with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRoutes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRoutesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datastream.v1alpha1.Route[] = []; - stream.on('data', (response: protos.google.cloud.datastream.v1alpha1.Route) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRoutes, request)); - assert( - (client.descriptors.page.listRoutes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRoutes without error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - generateSampleMessage(new protos.google.cloud.datastream.v1alpha1.Route()), - ]; - client.descriptors.page.listRoutes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datastream.v1alpha1.IRoute[] = []; - const iterable = client.listRoutesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRoutes with error', async () => { - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.datastream.v1alpha1.ListRoutesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRoutes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRoutesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datastream.v1alpha1.IRoute[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRoutes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('connectionProfile', () => { - const fakePath = "/rendered/path/connectionProfile"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - connection_profile: "connectionProfileValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectionProfilePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectionProfilePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectionProfilePath', () => { - const result = client.connectionProfilePath("projectValue", "locationValue", "connectionProfileValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectionProfilePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectionProfileName', () => { - const result = client.matchProjectFromConnectionProfileName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromConnectionProfileName', () => { - const result = client.matchLocationFromConnectionProfileName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchConnectionProfileFromConnectionProfileName', () => { - const result = client.matchConnectionProfileFromConnectionProfileName(fakePath); - assert.strictEqual(result, "connectionProfileValue"); - assert((client.pathTemplates.connectionProfilePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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('privateConnection', () => { - const fakePath = "/rendered/path/privateConnection"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - private_connection: "privateConnectionValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.privateConnectionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.privateConnectionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('privateConnectionPath', () => { - const result = client.privateConnectionPath("projectValue", "locationValue", "privateConnectionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.privateConnectionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPrivateConnectionName', () => { - const result = client.matchProjectFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPrivateConnectionName', () => { - const result = client.matchLocationFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPrivateConnectionFromPrivateConnectionName', () => { - const result = client.matchPrivateConnectionFromPrivateConnectionName(fakePath); - assert.strictEqual(result, "privateConnectionValue"); - assert((client.pathTemplates.privateConnectionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('route', () => { - const fakePath = "/rendered/path/route"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - private_connection: "privateConnectionValue", - route: "routeValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.routePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.routePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('routePath', () => { - const result = client.routePath("projectValue", "locationValue", "privateConnectionValue", "routeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.routePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRouteName', () => { - const result = client.matchProjectFromRouteName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRouteName', () => { - const result = client.matchLocationFromRouteName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPrivateConnectionFromRouteName', () => { - const result = client.matchPrivateConnectionFromRouteName(fakePath); - assert.strictEqual(result, "privateConnectionValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRouteFromRouteName', () => { - const result = client.matchRouteFromRouteName(fakePath); - assert.strictEqual(result, "routeValue"); - assert((client.pathTemplates.routePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('stream', () => { - const fakePath = "/rendered/path/stream"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - stream: "streamValue", - }; - const client = new datastreamModule.v1alpha1.DatastreamClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.streamPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.streamPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('streamPath', () => { - const result = client.streamPath("projectValue", "locationValue", "streamValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.streamPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromStreamName', () => { - const result = client.matchProjectFromStreamName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromStreamName', () => { - const result = client.matchLocationFromStreamName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchStreamFromStreamName', () => { - const result = client.matchStreamFromStreamName(fakePath); - assert.strictEqual(result, "streamValue"); - assert((client.pathTemplates.streamPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/tsconfig.json b/owl-bot-staging/google-cloud-datastream/v1alpha1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-datastream/v1alpha1/webpack.config.js b/owl-bot-staging/google-cloud-datastream/v1alpha1/webpack.config.js deleted file mode 100644 index ce71b478c09..00000000000 --- a/owl-bot-staging/google-cloud-datastream/v1alpha1/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: 'Datastream', - filename: './datastream.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/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto index 7c6669aaeda..26118064528 100644 --- a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto +++ b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto @@ -70,6 +70,7 @@ message OracleProfile { } // Configuration for Oracle Automatic Storage Management (ASM) connection. +// . message OracleAsmConfig { // Required. Hostname for the Oracle ASM connection. string hostname = 1 [(google.api.field_behavior) = REQUIRED]; @@ -80,8 +81,8 @@ message OracleAsmConfig { // Required. Username for the Oracle ASM connection. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Password for the Oracle ASM connection. - string password = 4 [(google.api.field_behavior) = REQUIRED]; + // Optional. Password for the Oracle ASM connection. + string password = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. ASM service name for the Oracle ASM connection. string asm_service = 5 [(google.api.field_behavior) = REQUIRED]; @@ -135,6 +136,12 @@ message PostgresqlProfile { // Required. Database for the PostgreSQL connection. string database = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SSL configuration for the PostgreSQL connection. + // In case PostgresqlSslConfig is not set, the connection will use the default + // SSL mode, which is `prefer` (i.e. this mode will only use encryption if + // enabled from database side, otherwise will use unencrypted communication) + PostgresqlSslConfig ssl_config = 7 [(google.api.field_behavior) = OPTIONAL]; } // SQLServer database profile. @@ -239,8 +246,11 @@ message PrivateConnection { FAILED_TO_DELETE = 5; } - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifier. The resource's name. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Output only. The create time of the resource. google.protobuf.Timestamp create_time = 2 @@ -287,8 +297,11 @@ message Route { pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" }; - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifier. The resource's name. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Output only. The create time of the resource. google.protobuf.Timestamp create_time = 2 @@ -348,6 +361,67 @@ message OracleSslConfig { bool ca_certificate_set = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// PostgreSQL SSL configuration information. +message PostgresqlSslConfig { + // Message represents the option where Datastream will enforce the encryption + // and authenticate the server identity. ca_certificate must be set if user + // selects this option. + message ServerVerification { + // Required. Input only. PEM-encoded server root CA certificate. + string ca_certificate = 1 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + } + + // Message represents the option where Datastream will enforce the encryption + // and authenticate the server identity as well as the client identity. + // ca_certificate, client_certificate and client_key must be set if user + // selects this option. + message ServerAndClientVerification { + // Required. Input only. PEM-encoded certificate used by the source database + // to authenticate the client identity (i.e., the Datastream's identity). + // This certificate is signed by either a root certificate trusted by the + // server or one or more intermediate certificates (which is stored with the + // leaf certificate) to link the this certificate to the trusted root + // certificate. + string client_certificate = 1 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Input only. PEM-encoded private key associated with the client + // certificate. This value will be used during the SSL/TLS handshake, + // allowing the PostgreSQL server to authenticate the client's identity, + // i.e. identity of the Datastream. + string client_key = 2 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Input only. PEM-encoded server root CA certificate. + string ca_certificate = 3 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + } + + // The encryption settings available for PostgreSQL connection profiles. + // This captures various SSL mode supported by PostgreSQL, which includes + // TLS encryption with server verification, TLS encryption with both server + // and client verification and no TLS encryption. + oneof encryption_setting { + //  If this field is set, the communication will be encrypted with TLS + // encryption and the server identity will be authenticated. + ServerVerification server_verification = 1; + + // If this field is set, the communication will be encrypted with TLS + // encryption and both the server identity and the client identity will be + // authenticated. + ServerAndClientVerification server_and_client_verification = 2; + } +} + // A set of reusable connection configurations to be used as a source or // destination for a stream. message ConnectionProfile { @@ -356,8 +430,11 @@ message ConnectionProfile { pattern: "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" }; - // Output only. The resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifier. The resource's name. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Output only. The create time of the resource. google.protobuf.Timestamp create_time = 2 @@ -1024,8 +1101,11 @@ message Stream { // Backfill strategy to disable automatic backfill for the Stream's objects. message BackfillNoneStrategy {} - // Output only. The stream's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifier. The stream's name. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Output only. The creation time of the stream. google.protobuf.Timestamp create_time = 2 @@ -1084,8 +1164,11 @@ message StreamObject { pattern: "projects/{project}/locations/{location}/streams/{stream}/objects/{object}" }; - // Output only. The object resource's name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifier. The object resource's name. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Output only. The creation time of the object. google.protobuf.Timestamp create_time = 2 diff --git a/packages/google-cloud-datastream/protos/protos.d.ts b/packages/google-cloud-datastream/protos/protos.d.ts index 37d894955bc..870ad3d7618 100644 --- a/packages/google-cloud-datastream/protos/protos.d.ts +++ b/packages/google-cloud-datastream/protos/protos.d.ts @@ -5002,6 +5002,9 @@ export namespace google { /** PostgresqlProfile database */ database?: (string|null); + + /** PostgresqlProfile sslConfig */ + sslConfig?: (google.cloud.datastream.v1.IPostgresqlSslConfig|null); } /** Represents a PostgresqlProfile. */ @@ -5028,6 +5031,9 @@ export namespace google { /** PostgresqlProfile database. */ public database: string; + /** PostgresqlProfile sslConfig. */ + public sslConfig?: (google.cloud.datastream.v1.IPostgresqlSslConfig|null); + /** * Creates a new PostgresqlProfile instance using the specified properties. * @param [properties] Properties to set @@ -6351,6 +6357,321 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PostgresqlSslConfig. */ + interface IPostgresqlSslConfig { + + /** PostgresqlSslConfig serverVerification */ + serverVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null); + + /** PostgresqlSslConfig serverAndClientVerification */ + serverAndClientVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null); + } + + /** Represents a PostgresqlSslConfig. */ + class PostgresqlSslConfig implements IPostgresqlSslConfig { + + /** + * Constructs a new PostgresqlSslConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IPostgresqlSslConfig); + + /** PostgresqlSslConfig serverVerification. */ + public serverVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null); + + /** PostgresqlSslConfig serverAndClientVerification. */ + public serverAndClientVerification?: (google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null); + + /** PostgresqlSslConfig encryptionSetting. */ + public encryptionSetting?: ("serverVerification"|"serverAndClientVerification"); + + /** + * Creates a new PostgresqlSslConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PostgresqlSslConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IPostgresqlSslConfig): google.cloud.datastream.v1.PostgresqlSslConfig; + + /** + * Encodes the specified PostgresqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. + * @param message PostgresqlSslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IPostgresqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostgresqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. + * @param message PostgresqlSslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IPostgresqlSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostgresqlSslConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostgresqlSslConfig + * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig; + + /** + * Decodes a PostgresqlSslConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostgresqlSslConfig + * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig; + + /** + * Verifies a PostgresqlSslConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostgresqlSslConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostgresqlSslConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig; + + /** + * Creates a plain object from a PostgresqlSslConfig message. Also converts values to other types if specified. + * @param message PostgresqlSslConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostgresqlSslConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostgresqlSslConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostgresqlSslConfig { + + /** Properties of a ServerVerification. */ + interface IServerVerification { + + /** ServerVerification caCertificate */ + caCertificate?: (string|null); + } + + /** Represents a ServerVerification. */ + class ServerVerification implements IServerVerification { + + /** + * Constructs a new ServerVerification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification); + + /** ServerVerification caCertificate. */ + public caCertificate: string; + + /** + * Creates a new ServerVerification instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerVerification instance + */ + public static create(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification): google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification; + + /** + * Encodes the specified ServerVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. + * @param message ServerVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. + * @param message ServerVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerVerification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerVerification + * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig.ServerVerification; + + /** + * Decodes a ServerVerification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerVerification + * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig.ServerVerification; + + /** + * Verifies a ServerVerification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerVerification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerVerification + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification; + + /** + * Creates a plain object from a ServerVerification message. Also converts values to other types if specified. + * @param message ServerVerification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerVerification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerVerification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerAndClientVerification. */ + interface IServerAndClientVerification { + + /** ServerAndClientVerification clientCertificate */ + clientCertificate?: (string|null); + + /** ServerAndClientVerification clientKey */ + clientKey?: (string|null); + + /** ServerAndClientVerification caCertificate */ + caCertificate?: (string|null); + } + + /** Represents a ServerAndClientVerification. */ + class ServerAndClientVerification implements IServerAndClientVerification { + + /** + * Constructs a new ServerAndClientVerification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification); + + /** ServerAndClientVerification clientCertificate. */ + public clientCertificate: string; + + /** ServerAndClientVerification clientKey. */ + public clientKey: string; + + /** ServerAndClientVerification caCertificate. */ + public caCertificate: string; + + /** + * Creates a new ServerAndClientVerification instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerAndClientVerification instance + */ + public static create(properties?: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification): google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; + + /** + * Encodes the specified ServerAndClientVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. + * @param message ServerAndClientVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerAndClientVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. + * @param message ServerAndClientVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerAndClientVerification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerAndClientVerification + * @throws {Error} If the payload is not 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.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; + + /** + * Decodes a ServerAndClientVerification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerAndClientVerification + * @throws {Error} If the payload 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.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; + + /** + * Verifies a ServerAndClientVerification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerAndClientVerification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerAndClientVerification + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification; + + /** + * Creates a plain object from a ServerAndClientVerification message. Also converts values to other types if specified. + * @param message ServerAndClientVerification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerAndClientVerification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerAndClientVerification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a ConnectionProfile. */ interface IConnectionProfile { diff --git a/packages/google-cloud-datastream/protos/protos.js b/packages/google-cloud-datastream/protos/protos.js index 557e5b85653..1be2fd6bb11 100644 --- a/packages/google-cloud-datastream/protos/protos.js +++ b/packages/google-cloud-datastream/protos/protos.js @@ -11717,6 +11717,7 @@ * @property {string|null} [username] PostgresqlProfile username * @property {string|null} [password] PostgresqlProfile password * @property {string|null} [database] PostgresqlProfile database + * @property {google.cloud.datastream.v1.IPostgresqlSslConfig|null} [sslConfig] PostgresqlProfile sslConfig */ /** @@ -11774,6 +11775,14 @@ */ PostgresqlProfile.prototype.database = ""; + /** + * PostgresqlProfile sslConfig. + * @member {google.cloud.datastream.v1.IPostgresqlSslConfig|null|undefined} sslConfig + * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @instance + */ + PostgresqlProfile.prototype.sslConfig = null; + /** * Creates a new PostgresqlProfile instance using the specified properties. * @function create @@ -11808,6 +11817,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); if (message.database != null && Object.hasOwnProperty.call(message, "database")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); + if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) + $root.google.cloud.datastream.v1.PostgresqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -11862,6 +11873,10 @@ message.database = reader.string(); break; } + case 7: { + message.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -11912,6 +11927,11 @@ if (message.database != null && message.hasOwnProperty("database")) if (!$util.isString(message.database)) return "database: string expected"; + if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { + var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.verify(message.sslConfig); + if (error) + return "sslConfig." + error; + } return null; }; @@ -11937,6 +11957,11 @@ message.password = String(object.password); if (object.database != null) message.database = String(object.database); + if (object.sslConfig != null) { + if (typeof object.sslConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlProfile.sslConfig: object expected"); + message.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.fromObject(object.sslConfig); + } return message; }; @@ -11959,6 +11984,7 @@ object.username = ""; object.password = ""; object.database = ""; + object.sslConfig = null; } if (message.hostname != null && message.hasOwnProperty("hostname")) object.hostname = message.hostname; @@ -11970,6 +11996,8 @@ object.password = message.password; if (message.database != null && message.hasOwnProperty("database")) object.database = message.database; + if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) + object.sslConfig = $root.google.cloud.datastream.v1.PostgresqlSslConfig.toObject(message.sslConfig, options); return object; }; @@ -15042,6 +15070,721 @@ return OracleSslConfig; })(); + v1.PostgresqlSslConfig = (function() { + + /** + * Properties of a PostgresqlSslConfig. + * @memberof google.cloud.datastream.v1 + * @interface IPostgresqlSslConfig + * @property {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null} [serverVerification] PostgresqlSslConfig serverVerification + * @property {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null} [serverAndClientVerification] PostgresqlSslConfig serverAndClientVerification + */ + + /** + * Constructs a new PostgresqlSslConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a PostgresqlSslConfig. + * @implements IPostgresqlSslConfig + * @constructor + * @param {google.cloud.datastream.v1.IPostgresqlSslConfig=} [properties] Properties to set + */ + function PostgresqlSslConfig(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]]; + } + + /** + * PostgresqlSslConfig serverVerification. + * @member {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification|null|undefined} serverVerification + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @instance + */ + PostgresqlSslConfig.prototype.serverVerification = null; + + /** + * PostgresqlSslConfig serverAndClientVerification. + * @member {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification|null|undefined} serverAndClientVerification + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @instance + */ + PostgresqlSslConfig.prototype.serverAndClientVerification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PostgresqlSslConfig encryptionSetting. + * @member {"serverVerification"|"serverAndClientVerification"|undefined} encryptionSetting + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @instance + */ + Object.defineProperty(PostgresqlSslConfig.prototype, "encryptionSetting", { + get: $util.oneOfGetter($oneOfFields = ["serverVerification", "serverAndClientVerification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PostgresqlSslConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {google.cloud.datastream.v1.IPostgresqlSslConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig instance + */ + PostgresqlSslConfig.create = function create(properties) { + return new PostgresqlSslConfig(properties); + }; + + /** + * Encodes the specified PostgresqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {google.cloud.datastream.v1.IPostgresqlSslConfig} message PostgresqlSslConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlSslConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serverVerification != null && Object.hasOwnProperty.call(message, "serverVerification")) + $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.encode(message.serverVerification, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.serverAndClientVerification != null && Object.hasOwnProperty.call(message, "serverAndClientVerification")) + $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.encode(message.serverAndClientVerification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostgresqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {google.cloud.datastream.v1.IPostgresqlSslConfig} message PostgresqlSslConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostgresqlSslConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgresqlSslConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.decode(reader, reader.uint32()); + break; + } + case 2: { + message.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostgresqlSslConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgresqlSslConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostgresqlSslConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostgresqlSslConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.serverVerification != null && message.hasOwnProperty("serverVerification")) { + properties.encryptionSetting = 1; + { + var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify(message.serverVerification); + if (error) + return "serverVerification." + error; + } + } + if (message.serverAndClientVerification != null && message.hasOwnProperty("serverAndClientVerification")) { + if (properties.encryptionSetting === 1) + return "encryptionSetting: multiple values"; + properties.encryptionSetting = 1; + { + var error = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify(message.serverAndClientVerification); + if (error) + return "serverAndClientVerification." + error; + } + } + return null; + }; + + /** + * Creates a PostgresqlSslConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig} PostgresqlSslConfig + */ + PostgresqlSslConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig) + return object; + var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig(); + if (object.serverVerification != null) { + if (typeof object.serverVerification !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlSslConfig.serverVerification: object expected"); + message.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.fromObject(object.serverVerification); + } + if (object.serverAndClientVerification != null) { + if (typeof object.serverAndClientVerification !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlSslConfig.serverAndClientVerification: object expected"); + message.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.fromObject(object.serverAndClientVerification); + } + return message; + }; + + /** + * Creates a plain object from a PostgresqlSslConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig} message PostgresqlSslConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostgresqlSslConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.serverVerification != null && message.hasOwnProperty("serverVerification")) { + object.serverVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.toObject(message.serverVerification, options); + if (options.oneofs) + object.encryptionSetting = "serverVerification"; + } + if (message.serverAndClientVerification != null && message.hasOwnProperty("serverAndClientVerification")) { + object.serverAndClientVerification = $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.toObject(message.serverAndClientVerification, options); + if (options.oneofs) + object.encryptionSetting = "serverAndClientVerification"; + } + return object; + }; + + /** + * Converts this PostgresqlSslConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @instance + * @returns {Object.} JSON object + */ + PostgresqlSslConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostgresqlSslConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostgresqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig"; + }; + + PostgresqlSslConfig.ServerVerification = (function() { + + /** + * Properties of a ServerVerification. + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @interface IServerVerification + * @property {string|null} [caCertificate] ServerVerification caCertificate + */ + + /** + * Constructs a new ServerVerification. + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @classdesc Represents a ServerVerification. + * @implements IServerVerification + * @constructor + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification=} [properties] Properties to set + */ + function ServerVerification(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]]; + } + + /** + * ServerVerification caCertificate. + * @member {string} caCertificate + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @instance + */ + ServerVerification.prototype.caCertificate = ""; + + /** + * Creates a new ServerVerification instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification instance + */ + ServerVerification.create = function create(properties) { + return new ServerVerification(properties); + }; + + /** + * Encodes the specified ServerVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification} message ServerVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerVerification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificate); + return writer; + }; + + /** + * Encodes the specified ServerVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerVerification} message ServerVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerVerification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerVerification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerVerification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.caCertificate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerVerification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerVerification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerVerification message. + * @function verify + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerVerification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + if (!$util.isString(message.caCertificate)) + return "caCertificate: string expected"; + return null; + }; + + /** + * Creates a ServerVerification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} ServerVerification + */ + ServerVerification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification) + return object; + var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification(); + if (object.caCertificate != null) + message.caCertificate = String(object.caCertificate); + return message; + }; + + /** + * Creates a plain object from a ServerVerification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification} message ServerVerification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerVerification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.caCertificate = ""; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + object.caCertificate = message.caCertificate; + return object; + }; + + /** + * Converts this ServerVerification to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @instance + * @returns {Object.} JSON object + */ + ServerVerification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerVerification + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification"; + }; + + return ServerVerification; + })(); + + PostgresqlSslConfig.ServerAndClientVerification = (function() { + + /** + * Properties of a ServerAndClientVerification. + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @interface IServerAndClientVerification + * @property {string|null} [clientCertificate] ServerAndClientVerification clientCertificate + * @property {string|null} [clientKey] ServerAndClientVerification clientKey + * @property {string|null} [caCertificate] ServerAndClientVerification caCertificate + */ + + /** + * Constructs a new ServerAndClientVerification. + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig + * @classdesc Represents a ServerAndClientVerification. + * @implements IServerAndClientVerification + * @constructor + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification=} [properties] Properties to set + */ + function ServerAndClientVerification(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]]; + } + + /** + * ServerAndClientVerification clientCertificate. + * @member {string} clientCertificate + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @instance + */ + ServerAndClientVerification.prototype.clientCertificate = ""; + + /** + * ServerAndClientVerification clientKey. + * @member {string} clientKey + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @instance + */ + ServerAndClientVerification.prototype.clientKey = ""; + + /** + * ServerAndClientVerification caCertificate. + * @member {string} caCertificate + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @instance + */ + ServerAndClientVerification.prototype.caCertificate = ""; + + /** + * Creates a new ServerAndClientVerification instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification instance + */ + ServerAndClientVerification.create = function create(properties) { + return new ServerAndClientVerification(properties); + }; + + /** + * Encodes the specified ServerAndClientVerification message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification} message ServerAndClientVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerAndClientVerification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientCertificate); + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientKey); + if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.caCertificate); + return writer; + }; + + /** + * Encodes the specified ServerAndClientVerification message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.IServerAndClientVerification} message ServerAndClientVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerAndClientVerification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerAndClientVerification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerAndClientVerification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clientCertificate = reader.string(); + break; + } + case 2: { + message.clientKey = reader.string(); + break; + } + case 3: { + message.caCertificate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerAndClientVerification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerAndClientVerification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerAndClientVerification message. + * @function verify + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerAndClientVerification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + if (!$util.isString(message.clientCertificate)) + return "clientCertificate: string expected"; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (!$util.isString(message.clientKey)) + return "clientKey: string expected"; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + if (!$util.isString(message.caCertificate)) + return "caCertificate: string expected"; + return null; + }; + + /** + * Creates a ServerAndClientVerification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} ServerAndClientVerification + */ + ServerAndClientVerification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification) + return object; + var message = new $root.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification(); + if (object.clientCertificate != null) + message.clientCertificate = String(object.clientCertificate); + if (object.clientKey != null) + message.clientKey = String(object.clientKey); + if (object.caCertificate != null) + message.caCertificate = String(object.caCertificate); + return message; + }; + + /** + * Creates a plain object from a ServerAndClientVerification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification} message ServerAndClientVerification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerAndClientVerification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientCertificate = ""; + object.clientKey = ""; + object.caCertificate = ""; + } + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = message.clientCertificate; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + object.clientKey = message.clientKey; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + object.caCertificate = message.caCertificate; + return object; + }; + + /** + * Converts this ServerAndClientVerification to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @instance + * @returns {Object.} JSON object + */ + ServerAndClientVerification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerAndClientVerification + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerAndClientVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification"; + }; + + return ServerAndClientVerification; + })(); + + return PostgresqlSslConfig; + })(); + v1.ConnectionProfile = (function() { /** diff --git a/packages/google-cloud-datastream/protos/protos.json b/packages/google-cloud-datastream/protos/protos.json index d3fbe1116fa..d37d2095721 100644 --- a/packages/google-cloud-datastream/protos/protos.json +++ b/packages/google-cloud-datastream/protos/protos.json @@ -1564,7 +1564,7 @@ "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "asmService": { @@ -1657,6 +1657,13 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "sslConfig": { + "type": "PostgresqlSslConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1979,6 +1986,64 @@ } } }, + "PostgresqlSslConfig": { + "oneofs": { + "encryptionSetting": { + "oneof": [ + "serverVerification", + "serverAndClientVerification" + ] + } + }, + "fields": { + "serverVerification": { + "type": "ServerVerification", + "id": 1 + }, + "serverAndClientVerification": { + "type": "ServerAndClientVerification", + "id": 2 + } + }, + "nested": { + "ServerVerification": { + "fields": { + "caCertificate": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ServerAndClientVerification": { + "fields": { + "clientCertificate": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caCertificate": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, "ConnectionProfile": { "options": { "(google.api.resource).type": "datastream.googleapis.com/ConnectionProfile",